Create, edit and delete a cron job Print

  • Cronjob, Automatisierung, cPanel
  • 0

A cron job runs a script or command automatically at fixed intervals – for example for newsletters, data imports or scheduled tasks in WordPress.

Create a cron job

  1. Log in at https://cpanel.hoston.ch.
  2. In the Advanced section, click Cron Jobs.
  3. Under Add New Cron Job, choose an interval from Common Settings, e.g. Once Per Hour, or fill in minute, hour, day, month and weekday yourself.
  4. In the Command field, enter the command, for example:
    /usr/local/bin/php /home/USERNAME/public_html/cron.php
  5. Click Add New Cron Job.

Edit or delete a cron job

  1. On the Cron Jobs page, scroll to Current Cron Jobs.
  2. Click Edit next to the entry, adjust it and confirm with Edit Line.
  3. To remove it, click Delete and confirm with Delete again.

E-mail notification

Under Cron Email, set the address that receives the output of your cron jobs. Enter the address and click Update Email. If you do not want e-mails for a single job, append >/dev/null 2>&1 to the command.

Tip: Replace USERNAME with your cPanel username. Avoid very short intervals, as frequent runs consume your package's resources.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution