Creating Cron Jobs via Command Line

For Linux Web Hosting and Managed Dedicated Server packages

With Cron Jobs, recurring tasks can be completed automatically by using a script. For example, you can back up data from your website automatically on a regular basis.

You can run Crontab utility with the following options:

  • The -l option lists all the tasks configured for the crontab.

  • The -e options edits the crontab file. When you call this function, the Vi editor is usually started automatically. As soon as you leave the editor, the edited crontab file is installed automatically.

  • The -r options removes all task in the crontab.

To create cron jobs, follow these steps:

  • Log in to your webspace via SSH and run the command crontab -e.
  • The crontab opens using the VI editor.
  • Enter your cron jobs and close the editor to save your changes.