-4

I use ubuntu 14.04 LTS. I have created 2 cron jobs but only one works. The 2 different website building with drupal cms.

*/5 * * * * curl -s http://www.example.com/cron.php?cron_key=TzVesnZuNqR4mkjv_LgBemUV-oYvsfYalyHOfDtL4cc

*/5 * * * * curl -s http://www.example.gr/cron.php?cron_key=OrrbXhtfSEZ2NI7BlHjAPRtMT_ENAKaz68iH86Kl5wI

In /var/log/syslog, I get cron could not run because an invalid key was used, but my key is correct. When I launch manually, cron runs successfully.

I don't understand why this happens. Is there any solution?

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209

1 Answers1

1

What do you want to do? The commands you configured normally print the requested website on screen. But cron has no "screen".

I would recommed you do something like this to catch the output and investigate it:

*/5 * * * * curl -s http://www.example.com/cron.php?cron_key=TzVesnZuNqR4mkjv_LgBemUV-oYvsfYalyHOfDtL4cc > /tmp/job1.log
*/5 * * * * curl -s http://www.example.gr/cron.php?cron_key=OrrbXhtfSEZ2NI7BlHjAPRtMT_ENAKaz68iH86Kl5wI > /tmp/job2.log

The files job1.log and job2.log will contain the output of your last run. I'm pretty sure you will see an error message in one of the files.

o0x258
  • 158
  • 5