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
- Log in at https://cpanel.hoston.ch.
- In the Advanced section, click Cron Jobs.
- 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.
- In the Command field, enter the command, for example:
/usr/local/bin/php /home/USERNAME/public_html/cron.php - Click Add New Cron Job.
Edit or delete a cron job
- On the Cron Jobs page, scroll to Current Cron Jobs.
- Click Edit next to the entry, adjust it and confirm with Edit Line.
- 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.