Websites unlimited The Web Specialist!
Crontab

23/04/17
 
 
 

 « Return to FAQ Database

23/04/17

7

Created : 2016-02-10 09:25:27

Updated: 2016-02-10 09:26:59

Crontab

Crontab is a utility designed to execute programs (usually maintainence tasks) automatically as per a user-defined preset schedule.

Basically crontab is to Unix what Task Scheduler is to Windows.

The crontab interface in the HostRocket control panel consists of six fields...

the five smaller fields (Minute, Hour, Day, Month and Weekday) are used to specify the schedule the command

you are running is to be executed and the longer sixth text entry field (Command) is used for your command itself.

Crontab can be used to run any command which can be executed via a command prompt in a shell session.

It can be used to execute standard Unix commands, programs and even Perl and PHP scripts.

Here are some general examples of scheduling when you want your commands to be run:

0 * * * * every hour on the hour
0 0 * * * every day at midnight
0 0 * * 0 every week at midnight on Sunday
0 0 1 * * every month at midnight on the 1st of the month
0 0 1 1 * every year at midnight on the 1st of January

 

 

 

 

 

There are many possible uses for crontab. One of the more common/popular uses (which is also detailed in an FAQ under Other > Crontab)

is to automatically create and maintain MySQL database backups.

Using Crontab

Things to Note

- Make sure to reference the full and exact server path to the files called in your crontab commands

- Use common sense and consideration of others on your shared server when scheduling your cronjobs,

particularly when dealing with more demanding tasks (ex: don't setup scripts to update every minute on the

minute and avoid the excessive scheduling of any scripts which are likely to put a heavy load on the server)

- Try to avoid using 0 0 * * * (midnight) when scheduling daily tasks. As so many users have cronjobs setup to

run daily at the stroke of midnight whenever possible use a more "off peak" time such as 37 4 * * * (4:37 AM)

when substantially fewer users are likely to have jobs scheduled.

 

Your One Stop Shop Website & Hosting Support!

 Team

At Websites Unlimited Support Center & Project Management

Thank you for choosing Websites-unlimited!

 
 
 

{WEBSITE_NAME_LINK}

Your One Stop Shop Website & Hosting Support!

 

Team

At Websites Unlimited Support Center & Project Management

6060 Island Highway West, Qualicum Beach, BC, V9K 2E1, Canada

Off.: (250) 816-3614

Fax: (778) 748-0800

Thank you for choosing Websites-unlimited!


Websites Unlimited®tm is a Registered Trademark, a Division of 7998759 Canada Inc. 

Part of The AllYouCanFind.net family owned By CPC Group Marketing & Business Strategy.