0

I know that in Drupal 7 Poormanscron is part of the core, but to have cron running I need the site must be visited regurarly and it's not my case. I can't set up a cron job on web server to periodically run cron.

Is there any way to run cron periodically without setting a cron job on web server?

1 Answer 1

1

Yes indeed, Drupal exposes a URL to invoke cron, e.g.

http://www.example./com/cron.php?cron_key=ka_88ikb7ZbkszCQo6_GtZclwUsUsskfH54oOJqqBcE

Which you can call from anywhere, using whatever method you like (pingdom jumps to mind, for example). Obviously if your site is an intranet or something you'll need to work out how to route that request either from the internal or external network, but Drupal has you covered however you decide/need to do it.

You can find your external cron URL by visiting the status report at /admin/reports/status.

Note that if you have an advanced cron module like Elysia cron, your external URL may be different. Check the documentation for the specific module to be sure.

4
  • I've seen there are many webcron services like Easy Cron to setup a cron job or access cron URL periodically. The only problem is that my site is an intranet so I can't ping cron URL from outside.
    – rafneb
    Commented Sep 23, 2015 at 9:47
  • You'll need something inside the network pinging it then - the 3 options are: 1. Invoke it from the server the web site sits on, 2. Invoke it from a server elsewhere on the network, 3. Let poormanscron do its thing. Logically speaking there isn't a 4th choice
    – Clive
    Commented Sep 23, 2015 at 9:51
  • First option is exactly what I need. But how can I periodically run the URL from the server? I've only FTP access.
    – rafneb
    Commented Sep 23, 2015 at 9:58
  • That's what cron is for...there are any number of other scheduling softwares out there too, but you'll find cron already installed on pretty much any *nix based server, so it would probably make sense to use that. The job just needs to perform a wget at a regular interval. Otherwise, refer to the server's OS documentation to see what alternative software they might provide, or look for 3rd party software that fits your requirements. Essentially you just need a URL pinged every X minutes, so there are dozens of ways you could approach this (none that Drupal can help with for obvious reasons)
    – Clive
    Commented Sep 23, 2015 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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