loading

How to run scripts via cron jobs

Updated at
22/08/2023
Views
3123

You can run scripts via cron jobs in cPanel by following these steps:

  1. Log in to your cPanel account.

  2. Navigate to the "Cron Jobs" option in the "Advanced" section.

  3. In the "Add New Cron Job" section, select the time interval at which you want the script to run. You can choose from predefined intervals, such as "Every minute" or "Every day", or specify a custom interval using the fields provided.

  4. In the "Command" field, enter the command to run your script. For example, if your script is located in a file called "myscript.php" in your home directory, the command would be:

/usr/local/bin/php /home/username/myscript.php

Replace "username" with your cPanel username.

  1. Click on the "Add New Cron Job" button to save the cron job.

  2. You can view and manage your existing cron jobs in the "Current Cron Jobs" section.

YottaSrc footer

why choose us?

Better Pricing, Fast SSD Storage and Real 24/7
Technical Support.

control panel icon
cPanel

Managing Your Site Through CPanel With The Latest Version

security icon
FAST, RELIABLE & SECURE

99.8% Uptime Guarantee.
So Focus On Your Work!

support icon
24/7/365 Support

Day or night, rain or shine,
our team is here for you!

cloud backup icon
Daily Backup

Daily & Weekly Backup.
Your Files Are Safe!