You are here: Re: [PHP] question about a cron job « PHP « IT news, forums, messages
Re: [PHP] question about a cron job

Posted by Al on 01/17/05 17:19

Erwin Kerk wrote:
> Al wrote:
>
>> I've got a question about the following cronjob.
>>
>>>
>>> #At 3:01 our time, run backups
>>> 1 0 * * * /usr/local/bin/php
>>> /www/r/rester/htdocs/auto_backup/back_em_up.php
>>> >/www/r/rester/htdocs/auto_backup/cron.log 2>&1
>>>
>>> #At 3:02 clean up sessions folder
>>> 2 0 * * * (find /www/r/rester/htdocs/sessions/ -name 'sess_*' -mtime
>>> +1 -delete)
>>>
>>> #this is only for testing a new cronjob, every minute
>>> * * * * * /usr/local/bin/php
>>> /www/r/rester/htdocs/phpList_cronjob/process_cronjob.php
>>> >>/www/r/rester/htdocs/phpList_cronjob/cron.log 2>>&1
>>>
>>
>> The new one doesn't seem to want to run until after 3:01 or 3:02.
>> Shouldn't the sever just run it every minute?
>>
>> And, the every minute job doesn't add anything to its log file.
>>
>> Apache on a virtual host. The 3:01 and 3:02 jobs have been running
>> fine for months.
>>
>> Thanks
>>
>
> 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.
>
> Erwin
Wow, that is a key point and makes sense. Boy, I read several refs about
cronjobs and not one of them mentioned this.

So, if I put my 1 minute job first in the list, all should be well?

Thanks......

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация