Setting up a cron job on your hosting package
With a cron job you have a command or PHP script run automatically at set times, for example every 15 minutes or every night at 03:00.
Enter a domain name, such as yourdomain.nl.
This value doesn’t fit here. An example: whs1.
Web Hosting (DirectAdmin)
Also for Reseller Hosting.
- Log in to DirectAdmin via Single Sign-On from Mijn xYnta, or at
https://yourdomain.nl:2222. - Under Advanced Features, click Cron Jobs.
- At the top right, click CREATE CRON JOB.
- Enter the schedule under Minute, Hour, Day of Month, Month and Day of Week (see the examples below). A
*means "every". After Cron job will run:, DirectAdmin shows in words when the job runs. - Under Command, replace the text that is there with the command, for example
php $HOME/domains/yourdomain.nl/public_html/file.phpfor a PHP script, orwget -O /dev/null https://yourdomain.nl/file.phpto request a page of your website. - If you do not want to receive an email after each run, click PREVENT E-MAIL. DirectAdmin then adds
>/dev/null 2>&1to your command. - Click CREATE.
The cron job then appears in the list under Cron Jobs.
WordPress Hosting (Plesk)
- Log in to Plesk at
https://whs1.srvnl.nl:8443. You can find your server name in How can I find the server name of my hosting package? - On the Dashboard tab, under Dev Tools, click Scheduled Tasks.
- Click Add Task.
- Under Task type, choose what the task does: Run a command, Fetch a URL or Run a PHP script, and enter the command, the address or the script below it.
- Under Run, choose how often the task runs (for example Daily) and at what time. With Cron style you specify a schedule yourself.
- Under Notify, choose whether you want an email: Do not notify, Errors only or Every time.
- Click OK.
With Run Now you try out the task straight away; Plesk then reports whether it succeeded.


Example schedules
| when | Minute | Hour | Day of Month | Month | Day of Week |
|---|---|---|---|---|---|
| every 15 minutes | */15 | * | * | * | * |
| every day at 03:00 | 0 | 3 | * | * | * |
| every Monday at 01:15 | 15 | 1 | * | * | 1 |
Video

Related articles
Thank you for your feedback.

