Free Support via:  +31 (0)20 796 9999

Programming recurring tasks with Cronjobs

A cronjob is the right way to program a recurring task that is executed by a script on your account.

Add cronjobs via the control panel

Follow these steps in the control panel:

  1. Go to “My products”> “Web hosting”> Click on the button “Manage hosting” to the right of your domain name.
  2. Select “Developer tools” in the menu on the left and click on “Scheduled Tasks”.
  3. On the right, click on “Add”.
  4. Choose the domain name and add the path to which the script was uploaded.
  5. Select the desired frequency for your cron job (see image).
  6. Click on “Add cron job”
  7. Add the script with the cronjob to your hosting environment.

Add cronjobs via SSH

The advantage of a cronjob set via SSH is that it can run for about twenty minutes before the server will stop the script, compared to only five minutes if the cronjob was set via the hosting control panel.

To add a cronjob via SSH you must first activate SSH. Then you have to edit the/etc/crontab file. We explain how you do that.

Follow these steps to add a cronjob via SSH:

  1. Open your Terminal app or your Command Prompt (Command Line).
  2. Enter the following command:
    nano / etc / crontab

  3. Add your own cronjob. Check the correctness of the cronjob syntax (see example).
  4. Save it by clicking on “CTRL” + “O”. Click “Enter” to confirm. Close with “CTRL” + “X”.
Add your own cronjob
Updated on 16 September 2024

Was this article helpful?

Related Articles