VBX Co
Well-known member
We've installed an add-on to compress images, which works in batches using a cron job which we've reconfigured to run every 2 mins (we have 1+million images to process).
We noticed it was not running within 2 mins consistently, so after some research on these forums we discovered the "Server based trigger" - using the server's cron process to run outstanding XF jobs every minute.
We added our main site via crontab -e and the job runs as expected:
When we add a second site - a sub-site of the main forums on the same site - the jobs do not run:
If we run them at the command line (without the /dev/null) they both work as expected.
If we run only the sub-site in the cron it doesn't work.
We've discounted the idea of using the full path to PHP because this changes over time and will, eventually, break the cron entries.
We would have expected this to work okay, since there are two sets of files, config files, databases, etc. and the paths in the forum settings are different and both sites work perfectly well with no problems.
Any idea why the second cron isn't working?
We noticed it was not running within 2 mins consistently, so after some research on these forums we discovered the "Server based trigger" - using the server's cron process to run outstanding XF jobs every minute.
We added our main site via crontab -e and the job runs as expected:
* * * * * php /home/site/public_html/cmd.php xf:run-jobs >/dev/null 2>&1
When we add a second site - a sub-site of the main forums on the same site - the jobs do not run:
* * * * * php /home/site/public_html/subsite/cmd.php xf:run-jobs >/dev/null 2>&1
If we run them at the command line (without the /dev/null) they both work as expected.
If we run only the sub-site in the cron it doesn't work.
We've discounted the idea of using the full path to PHP because this changes over time and will, eventually, break the cron entries.
We would have expected this to work okay, since there are two sets of files, config files, databases, etc. and the paths in the forum settings are different and both sites work perfectly well with no problems.
Any idea why the second cron isn't working?
Last edited: