Cron Jobs setup using Cpanel in Linux Server
Cron jobs setup using Cpanel in Linux Server is really simple and most important for many task. Setting up a cron job and setting email notification for cron job status is describing in this article.
A simple introduction for Cron Jobs for what is it ? and How to use it ? . Yes , its really important in now days to setting up a cron jobs. Suppose you have to execute a script in certain interval of time , Or something like you have to send an email notification for every users on your system in a particular time automatically. All these requirements and more can be solved with Cron Jobs.
Ok, Let check How we can implement Cron Jobs in Cpanel in Linux Servers. First you have to login to Cpanel http://www.domain.com/cpanel . Then Under Advanced setting section choose the “Cron Jobs”. It will open up a new page look like follows.
In the above image we have an option to set up the email address When the Cron Jobs execution failure it will sent an email to that email Id with details. The next option is important settings thats stands when our script run and how many times in a day or week or months etc.
So setup the required execution time and days in the common settings It have the following options.
- Every Minutes.
- Every 5 Minutes.
- Twise an hour.
- Once an hour.
- Twise a day.
- Once a day.
- Once a week.
- In 15th Day.
- Once a month.
- Once a year.
Then the command entering option that is the important part.
wget -O /dev/null "http://www.yourdomain.com/your_url&key=some_encodedvalue"
The command should be like above the url have a key parameter it for security purpose. This key make sure your script will only run from cron jobs, bcoz the Cron jobs required a public url means accessible from browser URL without login session and other second level security cannot be integrated with Cron Jobs. Here is the important of “key” When you create a key with your own custom encode function then you can only decrypt the key and compare with actual value, then only allow to run the script.
I hope Cron Jobs setup using cpanel in Linux Server is now understandable for everyone.
Happy reading 🙂 🙂 🙂
One thought on “Cron Jobs setup using Cpanel in Linux Server”
I every time spent my half an hour to read this blog’s articles or reviews
all the time along with a cuup of coffee.