Linux remains the leading web hosting operating system (OS), and Linux cPanel hosting brings together the best OS with the best control panel. cPanel puts an extensive range of features at your fingertips, making day-to-day website administration a quick and easy process.
The majority of customers use cPanel to upload files to their website, create and modify mailboxes, and change domain name settings. However, cPanel hosting services take even the most complex tasks and make them accessible to all.
The Linux OS features a system called Cron. Cron is a job scheduler that automates commands or scripts from multiple users and runs them at specific times or intervals. Although Cron is potentially difficult to master, your cPanel web hosting service includes a tool named Cron Jobs that you can use to schedule tasks ahead of time.
Let’s look at how Cron Jobs works and how you can start using this powerful tool.
Accessing Cron Jobs in your cPanel hosting plan
After you have logged in to your cPanel hosting account, you will find Cron Jobs under the “Advanced” menu. Although Cron Jobs is a fairly advanced feature, it is easy to get started with, and you can learn a wide range of useful Linux commands online.
The Cron Jobs screen is divided into three sections:
Cron Email – Enter an email address into this field to receive an email every time a Cron Job runs. This is a great way to make sure you have configured Cron correctly.
Add New Cron Job – Use these fields to write and schedule your command. It is possible to enter times manually or use the drop-down menus to automatically set the most commonly used intervals.
Current Cron Jobs – A list of every Cron Job you have configured on your cPanel hosting account.
cPanel makes creating a Cron Job easier by providing clearly marked fields you can use to schedule tasks. The next stage is learning the Linux commands you need.
Use Cron Jobs to back up your cPanel hosting files
A great example of using Cron Jobs is archiving and compressing files on your server. You may want a specific directory to be compressed into a tar.gz archive file that you can easily download to your local desktop as a backup.
The command to complete this task is shown below:
tar –zcvf name-of-backup-file.tar.gz /path/to/desired/directory/
Let’s look at what the above command means in order to learn the basics of Linux commands.
First, you must give Linux an instruction. In this case, the instruction is “tar –zcvf” which means compressing a directory into a single archive using the gzip program that is built in to Linux. The rest of the command consists of further instructions that add more detail to your command. The first section is the name of the file you want Linux to create. The second is the directory on your server that you wish to archive and compress.
Using this command, you can create an automated Cron Job that will back up your folder on a regular basis, keeping your data safe.
Almost every Linux command uses the same basic structure – first the command, and then additional input that makes the command more specific. To learn some more useful Linux commands that can be used with Cron Jobs, visit http://www.fortystones.com/40-linux-shell-commands-beginners/.
Order professional cPanel hosting services from JaguarPC
With years of experience in cPanel hosting, JaguarPC is the ideal choice for your shared hosting, virtual server (VPS hosting), or dedicated server solution. Every JaguarPC hosting service comes with access to specific types of commands that can be used with Cron Jobs to automate your routine tasks.
In addition to cPanel hosting plans designed for end users, JaguarPC also provides cPanel reseller hosting using cPanel & WHM.
Each service is accompanied by proactive customer support, available 24/7/365 to help every customer make the most of their chosen solution.