View Full Version : cronjob problem
03-06-2007, 04:53 PM
when I execute a php script using a cronjob in this way
*/5 * * * * /usr/bin/php /usr/local/script/myscript.php
It works without problem and execute each minutes
If I use
*/5 * * * * /usr/bin/php /usr/local/script/myscript.php > /dev/null
it does NOT work ..
03-06-2007, 05:11 PM
03-06-2007, 05:24 PM
It was a typo it's already /dev/null :(
03-06-2007, 05:33 PM
Check your paths, check permissions, try to run the command from the console minus the "> /dev/null" and see if it gives you an error.
03-08-2007, 01:06 PM
The script from command line works without any problem.
> /dev/null works fine for all other cronjobs .
I'm going mad , which could be the problem ?
03-08-2007, 01:57 PM
cron wont like the > as an output direction, you don't need it anyway ...
*/5 * * * * php /usr/local/script/myscript.php /dev/null
That will output the result to /dev/null
03-08-2007, 06:16 PM
In CPanel the default path is already
/usr/bin/ so you just need to complete it and doing what sir_panels says should work.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.