I have the following CRON configuration:

crontab -l
* * * * * curl http://x.com/script.php

But it just doesn't work. The command "curl http://x.com/script.php" triggered manually works all fine so it's obviously something wrong with CRON. What could go wrong?

有帮助吗?

解决方案

From the top of my head, 'curl' is not in the PATH, when cron is trying to execute it. Type its absolute path, or use the PATH variable in the crontab. If that doesn't help, I would check if /usr/sbin/cron is running. If it is, also check permissions of /var/cron/tabs/ and its contents, and check the log file /var/log/cron for any suscpicious errors.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top