Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Scheduling a Perl Program

by peacemaker1820 (Pilgrim)
on Aug 28, 2002 at 19:34 UTC ( #193553=perlquestion: print w/replies, xml ) Need Help??

peacemaker1820 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks.
How do I schedule one of my perl programs to run daily at the same time. All I want that program to do is to get the data file from my webserver, play around with the attributes for a final format, and save it in a differnt file.
Is there a way to do that?
Greatly appreciate any thoughts!

Replies are listed 'Best First'.
Re: Scheduling a Perl Program
by lachoy (Parson) on Aug 28, 2002 at 19:49 UTC

    If you're not on a Unix machine with cron, a pure Java implementation called JCrontab which has worked well for me on Win32 systems. It uses the same crontab syntax and is cross-platform as well. It's got a few quirks (it's open-source), but it's easy to setup and run.

    Chris
    M-x auto-bs-mode

Re: Scheduling a Perl Program
by BrowserUk (Pope) on Aug 28, 2002 at 19:51 UTC

    And if your on windows:

    The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command. AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]] AT [\\computername] time [/INTERACTIVE] [ /EVERY:date[,...] | /NEXT:date[,...]] "command" \\computername Specifies a remote computer. Commands are scheduled + on the local computer if this parameter is omitted. id Is an identification number assigned to a scheduled command. /delete Cancels a scheduled command. If id is omitted, all +the scheduled commands on the computer are canceled. /yes Used with cancel all jobs command when no further confirmation is desired. time Specifies the time when command is to run. /interactive Allows the job to interact with the desktop of the +user who is logged on at the time the job runs. /every:date[,...] Runs the command on each specified day(s) of the we +ek or month. If date is omitted, the current day of the m +onth is assumed. /next:date[,...] Runs the specified command on the next occurrence o +f the day (for example, next Thursday). If date is omitt +ed, the current day of the month is assumed. "command" Is the Windows NT command, or batch program to be r +un. C:\test>

    What's this about a "crooked mitre"? I'm good at woodwork!
Re: Scheduling a Perl Program
by talexb (Canon) on Aug 28, 2002 at 19:38 UTC
    If you're on Linux (or any flavour of Unix), you can use cron to set that kind of thing up. And on Windows NT I think there's something called the Task Scheduler that does roughly the same thing.

    Be sure you test it first to confirm that the environment is set up correctly.

    --t. alex
    but my friends call me T.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://193553]
Approved by VSarkiss
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2020-11-24 18:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?