|
Posted by Al on 01/17/05 18:50
Michael Sims wrote:
> Erwin Kerk wrote:
>
>>The CRON daemon only refreshes it's job list after a job in the
>>current list is completed. Therefore, the CRON daemon won't notice the
>>"every-minute" job until 3.01 pm.
>
>
> I'm not sure I understand what you're saying above. Can you provide a pointer to
> documentation about this? The man page for Vixie cron states in part:
>
> "Additionally, cron checks each minute to see if its spool directory's modtime (or
> the modtime on /etc/crontab) has changed, and if it has, cron will then examine
> the modtime on all crontabs and reload those which have changed. Thus cron need not
> be restarted whenever a crontab file is modified."
>
> Vixie cron, at least, refreshes it's job list anytime a crontab is changed, and
> keeps that job list until the next change is made. Jobs should run according to
> their way they are scheduled, and shouldn't be affected by the order they are listed
> in the crontab or when other jobs are completed.
>
> Perhaps I'm not understanding what you're saying (if so, my apologies) or perhaps
> you are using a different flavor of cron that behaves differently. I really only
> have experience with Vixie cron, but I thought they all pretty much behaved the same
> way...
What you said has been my experience in the past. But, it has been a long time
since I fiddled with a cron job, so I wasn't certain of my memory.
Here is my code; but it doesn't run. I can't tell if there is anything wrong
with my crontab or my virtual webhost is faulty.
> #this is only for testing a new cronjob, every minute. This job replaces its log and error files.
> * * * * * /usr/local/bin/php /www/r/rester/htdocs/phpList_cronjob/process_cronjob.php >/www/r/rester/cronjob_reports/phpList.log 2>/www/r/rester/cronjob_reports/phpList.err
>
> #At 3:01 our time, run backups. This job replaces its log and error files.
> 1 0 * * * /usr/local/bin/php /www/r/rester/htdocs/auto_backup/back_em_up.php >/www/r/rester/cronjob_reports/auto_backup.log 2>/www/r/rester/cronjob_reports/auto_backup.err
There is a "cronjob_reports" folder. I am assuming that the ">" will create the
log and err files as needed.
Thanks....
[Back to original message]
|