HI,

I have a pressflow install and it has cron excluded from all caching layers (Varnish + Clouflare), my current crontab at

\etc\crontab

looks likes this :

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
0 * * * * /usr/bin/wget -O - -q "http://www.megaleecher.net/cron.php"
0 * * * * /usr/bin/wget -O - -q "http://www.megaleecher.net/scheduler/cron"
* * * * * wall test
* * * * * echo "Cron Worked $(date)" >> /tmp/cronworked.txt

The directory

/etc/cron.d

has a file named

drupal

with following contents :

0 * * * * root /usr/bin/wget -O - -q -t 1 http://localhost:81/cron.php

Now, the issue is when I run Elysia Cron manually it works, but this does not happen automatically. For example I have jStats cron setupped in Elysia to run every fifteen minutes but this does not happens ?

Comments

sgdev’s picture

Varnish and CloudFlare are going to attempt to cache the results of cron.php. As well in many Varnish VCL files, external access to cron.php is blocked entirely (you should check to see if yours is).

The right solution is to configure your crontab to bypass the domain name to instead point to the IP address (this will fix the CloudFlare part), and add your Apache port to the end of the IP (this will fix the Varnish part). Therefore instead of:

http://www.megaleecher.net/cron.php

you would have something like this (add your own IP and port as appropriate):

http://12.234.12.234:8080/cron.php

Another option would be to change how your cron.php runs to be instead done through an internal script as a daemon on the server.

Curious to know, you said in your original title that you were using both Varnish and Boost. Is there a particular reason why?

gotheric’s picture

Status: Active » Closed (works as designed)

From next version another solution is to use drush to invoke system cron (avoiding wget).