Loading...

Knowledge Base

Cron Jobs in cPanel

About Cron

Cron is a Linux daemon used to automate scheduled tasks (called cron jobs) on a server. It allows you to run commands or PHP scripts at specific time intervals, such as once a day, once a week, or at a custom schedule.

Step 1: Log in to cPanel from the BigRock Dashboard

Log in to your BigRock dashboard.

BigRock Login

Search for your domain name under the Orders section.

Search Domain

Click on My Hosting from the top menu and then select Go To cPanel.

Go to cPanel

Step 2: Access Cron Jobs in cPanel

Once you are logged in to cPanel, follow the steps below to manage Cron Jobs.

  1. On the cPanel home screen, scroll to the Advanced section and click on Cron Jobs.
    (If the Cron Jobs option is missing, contact your hosting provider to enable it.)

     

  2. Under the Common Settings section, select how often you would like the cron job to run (for example, Once per 15 minutes). Choosing a predefined option will automatically configure the schedule for you, though you may also set the timing manually if required.  Please note that for Shared Hosting, Reseller Hosting, Cloud Hosting, and Business Hosting, the minimum allowed execution interval for a cron job is 15 minutes. For VPS and Dedicated Servers, there are no such restrictions, and cron jobs can be configured to run at shorter intervals as needed.

     

  3. In the Command field, enter the command you want to run. Below are some common examples:

    bash /home/cpanelusername/full/path/to/your/bash/script.sh
    
    perl /home/cpanelusername/full/path/to/your/perl/script.pl
    
    python /home/cpanelusername/full/path/to/your/python/script.py
    
    /usr/local/bin/php /home/cpanelusername/full/path/to/your/php/script.php
    

    If a specific PHP version is required, use the corresponding ea-php binary. For example, for PHP 8.2:

    /usr/local/bin/ea-php82 /home/cpanelusername/full/path/to/your/php/script.php
    
  4. After adding the cron job, you can edit or delete it at any time from the Current Cron Jobs section.

Loading...