I am doing some updates on existing drupal multi site set up and am unable to set up cron for subsites. Subsites are accessed in a different way (example.com/site1 example.com/site2 ) From browser accessing example.com/site1/cron.php runs the cron but its not running from crontab.

45 11 * * * /usr/bin/lynx -source http://example.com/site1/cron.php
45 11 * * * /usr/bin/wget -O - -q -t 1 http://example.com/site1/cron.php
45 11 * * * curl --silent --compressed http://example.com/site1/cron.php

Tried all these but its not triggering cron functions.

  • Are you getting some errors in the log? Did you try to run the cron.php as an anonymous user? – Aram Boyajyan Aug 21 '12 at 8:15
  • Yes, tried as anonymous user and it works fine in browser. – GoodSp33d Aug 21 '12 at 8:22
  • Check error log both in DB and on the server and post back here. – Aram Boyajyan Aug 21 '12 at 8:23

It was not resolving the host names. Added an entry to /etc/hosts and it worked fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.