Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Schedule timer in Stata?

    Hi there,

    I was hoping someone could help me with this: I would like to run my Stata commands at certain times of the day (on a schedule) and with certain number of seconds/minutes in between (not the entire do-file, just a few commands).

    Would the -timer- command help run my commands on a schedule? If not, any other suggestions?

    Thanks,

    R

  • #2
    I don't have any ideas about how to schedule the start of the whole thing: I'm unaware of any Stata commands that do that sort of thing, though your operating system might provide such a feature.

    To space out the execution of commands within a do-file, the -sleep- command should be of help.

    Comment


    • #3
      No. Is there something in -help timer- that led you to believe that it did?

      Most people schedule jobs using operating system commands to call Stata.

      Comment


      • #4
        Renata,
        1. the timer command will not deliver what you want. It is intended for measuring performance, not scheduling.
        2. in the questions like this it is important to make sure you state the OS and version of OS and Stata clearly. Otherwise you will end up with a bunch of Unix instructions. Why not? They are fun!
        3. you may or may not have the permissions to schedule anything on your computer. that may be restricted. If you are in a maintained environment, check with your system administrator who is exactly the person to resolve this kind of questions and has the knowledge of all local policies.
        4. if you are on Windows, Microsoft provides a bunch of references on the task scheduler. For example: http://windows.microsoft.com/en-US/w...#1TC=windows-7Specifically for running Stata, check out the following instructions: http://www.stata.com/support/faqs/windows/batch-mode/
        5. Also check http://www.google.com with it you can quickly find resources like: http://www.stata.com/manuals13/gswb.pdf (not quite sure why there is an "Advanced Stata Usage" section in the "Getting Started" manual). Method #3 is what you need.
        6. if everything else fails, you can set up one Stata to just throttle and wait for a particular moment, then execute a task. It depends whether you need to perform the task at particular moment: e.g. to submit your assignment via a web system 30 seconds before the deadline, or you just need to delay execution to optimize the use of resources throughout a day. there might be different solutions for each.
        Best, Sergiy Radyakin

        Comment


        • #5
          Clyde, Mike and Sergiy, this is super helpful, thanks so much!

          Comment


          • #6
            And just to follow up, Clyde's -sleep- command suggestion and Sergiy's task scheduler are the things I was looking for. So thanks again!

            Comment

            Working...
            X