Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

crontab not working #75

Open
fritzweisshart opened this issue Apr 6, 2015 · 4 comments
Open

crontab not working #75

fritzweisshart opened this issue Apr 6, 2015 · 4 comments

Comments

@fritzweisshart
Copy link

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?

@alexmuller
Copy link
Contributor

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

@fritzweisshart
Copy link
Author

Sorry, of course there is no space in the path.
Imagine something like
0 1 * * * php /web/html/xyz/blabla//tweetnest/maintenance/loadtweets.php

@alexmuller
Copy link
Contributor

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

@fritzweisshart
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants