Cron. Time Settings
Crontab in the Control Panel should be set to run at the maximum frequency allowed on your host. Ideally, it should attempt to run every minute the admin/cron.php program which is included in this module.
The admin/cron.php program does not</strong > run if:
- the program is already running
- among all cron job tasks, there is no one that should be running at this hour.
Task start time
It is configured individually in each supplier form, in the "Cron" tab:
(no spaces allowed, character * means "each").
Explanations
- start the task at any minute: from 5:00 to 5:59
- start the task at any minute: from 13:00 to 13:59
- start the task at any minute: from 19:00 to 19:59
- Monday(1), Wednesday(3) and Friday(5) only
- every week
This setting starts the task for the first time on Monday, at 5:00, if the previous task has finished running. Otherwise, it may start later, any minute between 5:00 and 5:59.
The cron time on the server may not match the time in your time zone, and may not match the server time:
That way the "GMT:" field should be set by trying.
Period
The task start time can be denoted by *. This means that the task must start immediately after the previous task ends. Thus, it is possible to run all tasks in a cycle, based on their priority.
But in order to prevent only the task with priority 1 from being executed all the time, you need to set a period during which no task can be executed again.
By default, the cron.php program has a period of 240 minutes, which means that each task can be re-executed no earlier than after 4 hours.
By default, the program assumes that all your tasks will be completed within 4 hours. You can adjust this in the admin/cron.php file at this line:
The value of the period must not be less than the total time of all cron tasks.
Attention
For example, if the period is set to 4 hours, then this time setting does not make sense:
because if the package starts at 2 o'clock in the morning, then its next start is possible not earlier than 6 o'clock in the morning.
Troubleshooting
Often when debugging, cron is run from the browser: site.com/admin/cron.php
If you don't want to wait 4 hours to run the package again set the period to 1 minute temporarily.