The cPanel hosting panel allows you to create and add scheduled tasks, which will be performed automatically at certain intervals of time. If you worked with Linux-based systems, these are cron tasks.
For example, you can create a script to perform database backups and send them to you via FTP, or you can run a PHP file: to send a report at the end of the day.
To create a scheduled task, you need to go to the hosting control panel and open the "Cron Jobs" section. Setting up is as simple as possible:
- in the "Common settings" field select the desired script execution interval;
- in the "Command" field enter your script.
- if you want to run a PHP file, type in the line "/usr/local/bin/php" and then the full path to the file.
You can first test the script by connecting to the SSH hosting before creating the cron task.