If my main crontab runs the magento cron.php every 30 mins and i have a cron job set in a modules config.xml to run every 15 mins. Will that mean the modules cron gets run:
- Once every 30 mins
- Twice every 30 mins
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
There are a swath of configuration options for cron in the Magento admin under System Configuration -> System -> Cron. The one titled "Missed if Not Run Within" is, by default, set to 15 minutes and will affect what you're trying to determine. With this set at it's default of 15 minutes…
…the job scheduled for every 15 with crontab executing every 30 would (theoretically) be run only once per 30 minutes with the job scheduled for the 15 minute mark being marked as missed. However, this cannot be relied on, as the timing of the cron cycle being off by a few seconds could land it occasionally within the 15 minute period and run it twice in one cycle. So don't rely on it only running once every 30 minutes.
My suggestion would be to set the crontab to run every 5 minutes, then control the jobs actual scheduling using the AOE Scheduler module... which I've heard so much about, but haven't yet used it much myself. :)
Checkout out the Aoe Scheduler extension. It gives you a great overview of the running crons.
Magento should run all cronjobs that are scheduled to run AFTER the last run so it should execute the cron twice every 30 minutes. If you check out the class
Mage_Cron_Model_Observer the jobs are retrieved as an collection in the method
You can see that it only filters on status
pending and since two jobs were added during the 30 minutes with that status it will execute them .
I'd advice you to run the cron every 5 minuten just to ensure Magento and the 3th party extensions using cronjobs runs properly