I want to create a cron that runs every 30 minutes.
I am using another cron as an example – I have created the cron in a config.xml
file, not using the admin interface.
The example I am using is the following:
<tracking_cron>
<schedule><cron_expr>0 4 * * *</cron_expr></schedule>
<run>
<model>tracking/observer::cron</model>
</run>
</tracking_cron>
My questions are as follows:
1) On what intervals is the above cron being run?
2) What would the cron_expr
be for a cron that should run every 30 minutes?
Best Answer
The Current cron expression you have added
<cron_expr>0 4 * * *</cron_expr>
will run every day at 04:00 AMIf You want it for every 30 minutes you can add expression as
<cron_expr>*/30 * * * *</cron_expr>
You can test expression from this reference site