Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Cron Jobs

by Felonious (Chaplain)
on Oct 07, 2002 at 01:19 UTC ( #203229=note: print w/ replies, xml ) Need Help??


in reply to Cron Jobs

Hi,
It's not clear to me why you need perl to "configure cron". If you don't yet understand cron, I'd stay away from Schedule::Cron until it's clear to you why you'd need it. If cron is really what you need for the job, it should be a one time setup. "man -a crontab" should get you started.

[TINPC@perlcabal.com shh]$ su real


Comment on Re: Cron Jobs
Re: Re: Cron Jobs
by jj808 (Hermit) on Oct 07, 2002 at 10:13 UTC
    From the original question:
    There will be a special interface for the director of the project in which he will decide at what time he wants the email sent to him
    This says to me that the code running the director's interface needs to schedule the reporting program (which sends the email) to be run at a time specified by the director, i.e. configure a cron job to run it at the required time. And presumably the director is free to change this, so a one-time setup of cron will not work.

    kidd, try reading the man page for the at command. This would be an easier way to do scheduling - just use backticks to call at. You could set the reporting program to reschedule itself each time it is run.

    An alternative approach would be for the director's interface to accept a time and store this in a file or database somewhere. Have your reporting program check this file on startup and only send the email if the current time = the requested time. Then use cron to run this script at frequent intervals, say every 5 minutes.

    JJ

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2014-07-31 01:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls