In the below example, I will create a executable #cron-job-delete-file.sh bash script file to hold the scheduled tasks commands; change its file permission to be “executable by admin/user”; and add it to cpanel cron job to be ran every 1 minutes:

  1. create the following #cron-job-delete-file.sh in ~/public_html

2025-11-11T093224

  1. create the folder #cron-sample-directory at ~/public_html

2025-11-11T093359

  1. change the file permission and test the execution via terminal

2025-11-11T095353

  1. add the cron job (optionally, you can also add an email to notify you every time when cron job executes)

2025-11-11T093307