HOW TO CREATE A CRONJOB IN CPANEL

  1. Log in to your cPanel account provided by your hosting provider.
  2. Look for the “Advanced” or “Advanced Features” section in cPanel.
  3. Locate and click on the “Cron Jobs” option. This will open the Cron Jobs interface.
  4. In the Cron Jobs interface, you will see different fields and options to configure your cron job.
  5. Choose the interval at which you want your cron job to run. You can select common intervals like “Once Per Minute,” “Once Per Hour,” or set a custom interval.
  6. Enter the command you want to run in the “Command” field. This command specifies the task you want the cron job to execute. For example:
    • To run a PHP script: /usr/bin/php /home/username/public_html/script.php
    • To run a Python script: /usr/bin/python /home/username/public_html/script.py
    • To run a shell script: /bin/sh /home/username/public_html/script.sh
  7. Optionally, you can add email notifications for the cron job output. Enter your email address in the “Email” field to receive notifications or leave it blank to disable email notifications.
  8. Click on the “Add New Cron Job” or “Create” button to save and schedule the cron job.
  9. You will see a confirmation message indicating that the cron job has been successfully created.

Note: Make sure to replace “username” with your actual cPanel username and adjust the file paths accordingly.