Setting up a cPanel cronjob

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).

Cette réponse était-elle pertinente?

Articles connexes

FTP access details

FTP transfer is the most popular way to copy / move website files to the server. Alternatively,...

How to access cPanel account?

All accounts hosted on Sitebunker.net have a cPanel account. The administration panel can be...

How to create an FTP account from cPanel?

The FTP account allows you to access your site's files using the File Transfer Protocol. To...

How to perform a Full Backup account from cPanel?

Backup is a copy of files, so it can be used to restore your website in case you want to return...

How to setup an Addon Domain?

Skyservers Hosting through its cPanel offers the possibility to host on the same hosting account...