We will be moving cron calls which are now made with a wget http://server/cron/(daily|yearly|hourly)/$key for a standard CLI php call … something like php /var/www/eramba_v2/app/cron/daily
Using http for this was a bad idea (10 years old idea) as:
- is hard for people to understand the key concept
- http uses redirects and many times it gets trapped on proxy, firewall, etc and is hard to see what is going on
- timeouts , network layer timeouts in particular are painful as these processes do more and more tasks and they simply take longer to run
We’ll support both: CLI and Web crons for a while until we fully transition to CLI crons, this will be configured at System / Settings / Cron Key:
There will be the option of “Web Cron” and “CLI Cron” , if the “Web” is chosen then the key will be an option as it is now. If the “CLI Cron” is selected then a greyed parragraph will be shown with the cron entries that needs to be inserted:
@hourly /usr/bin/php /var/ww…path to the hourly cron file
@daily /usr/bin/php /var/ww…path to the daily cron file
@yearly /usr/bin/php /var/ww…path to the yearly cron file
When running on CLI, no key is required.
We also think there might be a little more speed on crons when run trough CLI , a quick test showed that there is an improve of %30, havent tried but perhaps if you nice the process it could go quicker?
This is likely to come by the end of next week