Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Cron Jobs

by Felonious (Chaplain)
on Oct 07, 2002 at 01:19 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://203229]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-18 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found