Reply to RE: [PHP] question about a cron job

Your name:

Reply:


Posted by Michael Sims on 01/17/05 17:04

>> #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?

Yes, it should. Cron normally emails any output (including messages to stderr) to
the owner of the cron job. In this case you have "2>>&1" at the end of your command
which should be "2>&1". On my machine executing a command with "2>>&1" results in:

-bash: syntax error near unexpected token `&'

which might explain why your job isn't running. If I setup a test job that looks
similar to yours, the above error output is emailed to me.

Jay Blanchard wrote:
> You have to specify each minute...

"* * * * *" is sufficient for that. I've got a couple of jobs on a box here that
run every minute and that's the way they are entered in my crontab...

HTH

[Back to original 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

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