Manage Cron Jobs (tasks)¶
Helpful feature for making crons
We recommend using crontab.guru editor for cron schedule expressions, if you know what you do.
Adding cron task¶
Scalesta functionality allows you to manage your project's active Cron Jobs (tasks) via the Scheduler menu. To add or remove a scheduled job select the required project and log in to the Server panel manager, find Scheduler menu and open it, insert a cron description in the Description field and its command in the Command field, and select the required frequency from the suggested options or specify another frequency in the Frequency field directly. When all the parameters are set up, click Add new scheduled job — done , the cron job is added to the server configuration.
Recommended way of cron recording
We recommend using a secure and correct way to add a cron task:
php /srv/projects/example.com/public_html/admin_or_crontask.php --dispatch=some.dispatch_name --cron_password=s0m3S3cur3P4ssw0rd
curl "hXXp://example.com/admin_or_crontask.php?dispatch=some.dispatch_name&cron_password=s0m3S3cur3P4ssw0rd"
Extended settings for the CRON job¶
Timeout of the task¶
This option will
- Timeout for the task parameter can limitate task execution time
- Default: not limited, maximum: 300 sec
- Count of retries in case of timeout awaliable if Timeout for the task is set
- Default: 0, maximum: 3
- Count of retries in case of error
- Default: 0, maximum: 3
Active Cron Jobs (tasks) management¶
Every added cron task appears in the Scheduled Jobs list where you can see the Command, Frequency of the cron task. You can also edit or remove a cron task if it is no longer required by clicking Edit or Remove accordingly in Actions menu. Here you can also run cron job manually or check it's result.
Need assistance?
If you have a problem, need assistance with tweaks or a free consultation, if you just want to discuss your project with experts and estimate the outcome, if you're looking for a solution that reinforces your online business, we will help. Let us know through Scalesta account.