Skip to content

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.

adding cron

Recommended way of cron recording

We recommend using a secure and correct way to add a cron task:

/usr/bin/php /srv/projects/example.com/public_html/admin_or_crontask.php --dispatch=some.dispatch_name --cron_password=s0m3S3cur3P4ssw0rd 
instead of
/usr/bin/curl "hXXp://example.com/admin_or_crontask.php?dispatch=some.dispatch_name&cron_password=s0m3S3cur3P4ssw0rd" 
for your cron's password not to be stored in the access.log file, make your URL shorter and easier to read/fix/understand and avoid the closing of a curl/wget connection (a cron will be cancelled in this case) by a web-server.

Extended settings for the CRON job

extended settings

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 remove a cron task if it is no longer required by clicking Remove in Actions menu.

adding cron

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.