Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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

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.

[ 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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://203229]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2018-05-23 13:02 GMT
Find Nodes?
    Voting Booth?