How to: Development: Manage CRON tasks

Crontab recommendations

We recommend using secure and correct way to start crontab

/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"

because:

  1. Your cron_password will be stored in access.log. It is not securely way.
  2. Long URL is unreadable and hard to fix/understand.
  3. Web-server can close curl/wget connection and your crontask will be canceled.

Crontab listing

For showing the list of your crontab tasks, run this command under developer user:

crontab -l

Crontab editing

For editing your crontab tasks, run this command under developer user:

crontab -e

We recommend using crontab.guru for making cron schedule expressions, if you know what you do.

Also, if you need help with it, you can contact us via HelpDesk system.


---

Hint

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 MyCloud or email.