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

IN THIS ARTICLE:

Add cronjobs via the control panel

Follow these steps:

  1. Go to “My products”> “Web hosting”> Your domain name.
  2. Select “Site Settings” in the menu on the left.
  3. Select the “Scheduled Tasks” tab.
  4. Click on “Add Cronjob”.
  5. Select the desired frequency for your cronjob (see image).
    Tip: in the title above you see the frequency change according to your choices.
  6. Choose the domain name at the bottom and add the path to which the script was uploaded.
    (You first add the script with the cronjob to your hosting environment)
  7. Click on “Generate scheduled task” to confirm.

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, as opposed to just 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”.

Updated on 2 February 2020

Was this article helpful?

Related Articles