Crontab

Schedule tasks to run on the server

With Crontab, you can specify commands to run on a given schedule. This means you can automatically run updates, schedule tasks, and send emails, for example.

As with the Windows task scheduler, you choose the time, date and frequency of your automated tasks.

Example use cases:

  • Automate updates and run scripts
  • Back up your websites and databases
  • Access data streams that update your website
  • Check the status of folders containing sensitive data, to secure a website
  • Send emails containing access logs or links to backups

How to use the job scheduler

Simply go to the OVHcloud Control Panel and use it to schedule all the jobs that need to be run.

You can create or modify the scripts to be run periodically. It really is that simple!

You select the script, and the day and time you want it to run.

The advantages of the job scheduler

  • Job scheduling

    Automate your website's recurring jobs using our job scheduler, available on all of our Web Hosting plans. Back up your website and databases, generate your invoices, or update your cache at regular intervals. To do this, create the script you want, then configure your job scheduler (Crontab) from the OVHcloud Control Panel.

  • Track your jobs

    Via the OVHcloud Control Panel, you can view whether jobs have been run successfully. If a job was unable to run successfully, you can retrieve the error messages, then modify future jobs accordingly.

  • Go further

    <?php
    system("mysqldump --host=your_mysql_server --user=database_name --password=password database_name > backup.sql");
    system("gzip backup.sql");
    system("mysqldump --host=your_mysql_server --user=database_name --password=password database_name > backupbase2.sql");
    system("gzip backupbase2.sql");
    ?>

    Example of a script to run in order to save and compress two databases.

NB:
You can run a job at a maximum frequency of once per hour.

In the OVHcloud Control Panel, you can choose to run it every week, or every month, for example.

My customer accountContact SalesWebmail OVHcloud Blog

Welcome to OVHcloud.

Log in to order, manage your products and services, and track your orders

Log in