cPanel offers the ability to set up a cronjob in a cPanel account. A cron is an action that allows files / scripts to run at a certain time interval.

These can be set in the "Advanced" cPanel -> "Cron Jobs" section.

1. In the "Email" field, enter your email address where you'll receive cron results.

2. In the "Common settings" section, you can set the interval at which you want the timer to run. And in the "Command" field, type the absolute path to the running script.

EXAMPLE OF CRONJOB:

A cron that cleans the files in the / home2 / MyUser / public_html / test folder would be:


15 5 * * * find / home / USERULMEU / public_html / test -mtime +1 -delete> / dev / null 2> & 1

The horn above runs:

every day at 05:15 (15 6 * * *)

will delete all files in the / home2 / MY USER / public_html / test folder

older than one day (-mtime +1).

 

 

Was this answer helpful? 1 Users Found This Useful (1 Votes)