Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
2.12.5. cron limitations
Attention!
When running PHP scripts using the site's php.ini, the execution time limit will be limited to the value of max_execution_time for that site, when using wget — it will be limited by the response time of the target resource.Main limitations:
| Shared hosting | Business hosting | |
|---|---|---|
| Execution time limits | 1 hour | 4 hours |
| Minimum run interval | 1 minute | 1 minute |
If the running process does not complete within the allotted time, it will be forcibly terminated by the system. In the cron log, the status "Killed" will be displayed for such a process.
If the execution time limit is insufficient, consider the following options:
- If the script processes a large amount of data, you can split it into parts so that each time the script is run, it does not process all the data at once, but only the next part, and fits within the allotted time.
- Change the logic and optimize the code of the script being run so that it has enough time to perform the necessary actions within the allotted time.
- If you are using a shared hosting plan, you can switch to a business hosting plan, which has a significantly higher execution time limit.
cron does not allow tasks to be run more than once per minute. If necessary, try running the script in the background and setting the interval using the script's own logic. Please note: running cron tasks too frequently can lead to high consumption of server resources and, as a result, to errors in the operation of the hosting account's sites.
(3)