Use Cron Jobs to run a script on a schedule when the feature is enabled.
Before you start
Get the exact command and absolute paths from the application. Understand whether recurring executions could overlap or change customer data.
What to do
- Open Cron Jobs in cPanel and review existing entries so you do not schedule the same task twice.
- Choose an interval appropriate for the task. Enter the command with the full paths, including the required interpreter when the application specifies one.
- Set up a way to observe errors, such as a log outside your public website directory. Save the entry.
- Edit or remove only the intended existing entry when you change a schedule or retire a task.
Check that it worked
Check the first expected execution time and confirm the task produced the intended result without duplicate runs.
If it does not work
If a task does not run, verify the server time zone, exact paths, interpreter, permissions, and error output. Do not put credentials in a publicly visible log.