in reply to how can I automatically run the program every hour?

Although this has nothing to do with perl . . .

If you are on Windows NT, 2000, or XP, you can use the AT command. From a command prompt, type AT /? to get the usage. By using AT you don't actually have to be logged in, the computer just needs to be running.

If you are using Windows 95, 98, or Me (or if you don't have access to the AT command due to security restrictions on your computer), you will have to set a sleep timer of approximately 3600 seconds in a loop in your script.

The biggest problem with doing the sleep method is that you are putting your script into an endless loop. You can set up a condition which will exit the loop if you want, or you can just allow windows to terminate the process when the system reboots (or logs off).

  • Comment on Re: how can I automatically run the program every hour?

Replies are listed 'Best First'.
Re: Re: how can I automatically run the program every hour?
by hmerrill (Friar) on Feb 10, 2004 at 18:44 UTC
    On Windows you should also be able to use:
    Start - Programs - Accessories - System Tools - Scheduled Tasks
    HTH.
      briefly explain it please
        Do you have a windows computer? That was a brief explanation, start by clicking the start menu ... just keep reading the screen
Re: Re: how can I automatically run the program every hour?
by HamNRye (Monk) on Feb 10, 2004 at 19:46 UTC

    AT is simple to use. Use military time:
    at 14:45 "perl program.pl"

    It is easier to set them up with the Task Scheduler in windows, but you can still view the schedule by typing "at" at a command line. (Even via telnet.)