What are Cronjobs? How does a cronjob work?
What are Cron Jobs? [Important | Latest 2021]
Cronjob instructs the server to run a specific .php file as per specific intervals directed by the user. Cronjobs is the feature of cPanel which runs a specific php file on a command like once a day, every hour, every minute, every second etc…You will find there several commands you can choose to take action on that particular php file on a specific time..
This feature is very useful to those who wants to schedule tasks, send bulk mails, makes update on regular intervals…
How does Cronjobs work? [Easy Guide]
Now suppose I have a webapp which makes temporary xml files when user logs-in and stores their activity till they are online. When the leave the webapp, or remain inactive for about a hour, I want to delete them. So, how to i instruct my server to delete them ? How do I tell my server “Go Delete All Messages every 1 hour” ?
In this case, I make a php script which deletes those files when run. Then I setup a cronjob to run that php file every 1 hour/60 minutes/3600 seconds automatically.
Easy steps to Set up cronjobs in cPanel [Updated May 2019]
step::1 Login to cPanel
There are several more commands which i would like to show you.. You can just have a look below
step::4 Add your Cron Jobs here!!!
In the above example, replace “ea-php56” with the PHP version assigned to the domain you wish to use. Look in the MultiPHP Manager for the actual PHP version assigned to a domain.
Hope this helps you!!!
Thanks for reading!!!