tweetnest
tweetnest copied to clipboard
crontab not working
Calling loadtweets.php in the browser works. loadlog.txt shows attempt: Attempted load Mon, 06 Apr 2015 16:09:47 +0200
But a crontab like the following doesn't work: 50 1 * * * php /server path//tweetnest/maintenance/loadtweets.php No entry in loadlog.txt
Any idea? Is my crontab syntax wrong?
Does the path to loadtweets.php
contain a space?
50 1 * * * php /server path//tweetnest/maintenance/loadtweets.php
Your crontab syntax is correct, but I think what it means is "run the command php
with 2 arguments, /server
and path//tweetnest/maintenance/loadtweets.php
at 01:50 every day".
Adding a backslash to the path like this might work:
50 1 * * * php /server\ path//tweetnest/maintenance/loadtweets.php
Sorry, of course there is no space in the path. Imagine something like 0 1 * * * php /web/html/xyz/blabla//tweetnest/maintenance/loadtweets.php
Ah ok, that syntax looks right to me - if you try running that command at the prompt do you get any useful output?
php /web/html/xyz/blabla//tweetnest/maintenance/loadtweets.php
Thank you. I figured out, where the cronjob writes its output - and the error log. The Problem was: loadtweets.php needs PHP with curl support, and curl was not installed where cronjobs run.