You can set script to run at certain time in CPANEL>Cron Jobs option.
There you should select – Add New Cron Job.
Assume that we want to set script to run once a day. Cron is recommended to be performed at night, when overall server load is low.
In our case, we will be running script at 2am.
Select:
minute - 00
hour - 02
the rest - *
Command.
There we should enter a command to run script. We can run the script either sending request to URL (in a browser), or sending request to php-script using php command.
Command 1:
wget -O - -q -t 1 http://yourdomain/script.php
Command 2:
php /home/your login for cpanel/public_html/path to the script/script.php
Both of these ways are possible. Choose the one at your option.
After entering a command, click Add New Cron Job.
That is all. Cron job is set up.