Print This Article Post Comment Add To Favorites Email to Friends Ezine Ready

Cron Automatically Run Jobs On Your Website

By: John V. W. Howe Home | Internet-and-Business | Web-Hosting


CRON is a function in Unix and Linux operating systems which allows you to schedule a job and the job will run at the date and time scheduled until you delete the CRON statement.

Initially, you may consider this to be too technical for you, but not so if you will carefully read this article. It is a function of which you should be aware. Even if you do not need it now, remember about CRON for the day you will need it.

Apache server includes this function and it is easy to use with the graphical interface.

The format for CRON is CRON * * * * * Command to execute"

Each asterisk represents a field in the command and can contain the following values. If you do not want to specify a value for that particular field, leave the asterisk in that position in the CRON statement line. Each of the five fields is separated by white space.

Here are the values that each field (left to right) can have other than the asterisk:

Field -------- Value ----- Description
minute ----- 00-59 ------exact minute the cron executes
hour -------- 00-23 ------ hour of the day the cron executes(0 =midnight)
day --------- 01-31 ------ day of the month the cron executes
month ------ 01-12 ------ month of the year the cron executes
weekday --- 00-06 ----- ay of the week the cron executes(Sunday = 0, Monday = 1, Tuesday = 2, etc)
command ---varies ------ sequence of commands to execute

What prompted the need for the CRON on our site was our use of the software package that required that we copy the ClickBank master file into a file on the Boomer-eZine website periodically so our copy is kept current with the ClickBank master.

Since we get busy and forget to do this weekly, a method to have our web host perform this automatically was the answer.

The CRON function is very flexible and can be set to run on almost any time frequency you can imagine.

If you specify a minute in the first field and an hour (24 hour clock) in the second field and leave all the other fields as asterisks, the specified program will run on that hour and minute every day. If you want the program to run twice a day at 10 and 11 AM, you can write the CRON as:

CRON 0 10,11 * * * Command to execute

With the proper combinations, you can set up a job to run automatically on almost any schedule that you can imagine.

Let's try a few. Write a CRON to execute on every Sunday at midnight.

If you got 0 0 * * 0 Command to execute", then you are right. The zero in the first position is on the hour. The zero in the second position is midnight. The zero in the fifth position (day of the week) is Sunday. This is what we used for our CRON settings for the CD AD Box update.

Set up a CRON to run once per year on the last day of the year at midnight.

CRON 0 0 31 12 * Command to execute

If you have a graphical interface on your web server, it is easy to enter the CRON information
Sometimes the CRON function is difficult to find in your control panel. If you have difficulty finding it, send an email to the support group for your web host and ask if this is available and if so, where is it located.

As I said earlier, you may not need this right now, but remember it for when it will come in handy for you. It can greatly simplify the work of managing your website.

Copyright 2006 John Howe, Inc.



Article Source: http://www.eArticlesOnline.com

About the Author:
John V. W. Howe is an entrepreneur, author, inventor, patent holder, husband, father, and grandfather. He has worked with computers for over 44 years. He is an expert in website creation and web hosting. He has published over 60 articles on the Internet covering diverse topics. His website http://www.the-best-web-host.com helps people analyze their needs and match those needs to the best web host. He also publishes http://www.boomer-ezine.com an ezine for Internet entrepreneurs.

Tags:
,

Please Rate this Article

 

Not yet Rated

Click the XML Icon Above to Receive Web-Hosting Articles Via RSS!

Recent Related Articles From Web-Hosting

  • How To Improve Your Reading Skills
    By: Ken Charnly | Jun 14th 2006
    According to one credible international survey it is said that world's top 500 most powerful professional have one thing common that their reading speed is more than 500 words per minute. The reading skills is a very a critical factor because this factor is responsible for improving your learning ability. Your ability of re ... Read

  • Running In The First Light Is Profit To The Body
    By: Ludwig | Oct 21st 2010
    Distinctive people exist obvious differences. Different cardiovascular function and physical condition people ought to have changed time, frequency, exercise method. If conditional allowed, expert proposal, you had better according to the healthy check-up and your calendar and dietary laws. Read

  • Why Lots Of Associates Do Exercise In The Morning
    By: Wallace Keynes | Oct 21st 2010
    There are lots of differences between individuals. Different cardiovascular function and physical condition people ought to have various time, frequency, exercise method. Experts pointed out that you ought to make your own menu according to your own physical condition list and work-rest order. Read

  • Ericsson Smooth Rocker Design 8.9-inch "pocket Machine" R169 Listed - Ericsson Cis-it Indu
    By: jojo | Jun 28th 2010
    SONYVAIOP launch, opened in the small market an exciting field, with the ultra compact body, powerful

    Notebook Function for a time by the business people, fashionistas and the pursuit of female friends. Sony to P is defined POCKET (also known as pocket machine), which is to the pocket PC. Recently, the Shenzhen Sh ...
    Read

  • Fossil Watches Are For Every Occasion
    By: JessicaThomson | Oct 8th 2008
    A fossil is an imprint or a body that is preserved in rock for ages and has withstood all the climatic changes and the vagaries of nature from time endless. The brand name of fossil watches is related to this terminology. The fossil watches not only show time but are a personification of time. A fossil watch besides perfor ... Read

  • True Quality Of A Seiko Diving Watch
    By: Ed J Price | Feb 16th 2009
    Watches in general have the primary function of telling time and that's why most people buy whatever watch they can find that looks good for their style while others care about added features and durability, which of course, are more expensive. However, divers have special needs and they need a watch that can help keep trac ... Read

  • A Bette Method To Use Cd Ripper Free
    By: Eric1981 | Jun 4th 2009
    There is much CD ripper in Internet and some of them are also free. But most of them couldn’t be used nor has limitation in function or using time. If you want some good tool, then you need to pay for them. Read

  • Things To Know About An Ip Security Camera
    By: chrispappas247 | Oct 26th 2009
    As soon as the camera catches an image, the sensors of the camera transforms the image in to a digital format and then making the use of Ethernet it sends it to the remote network computer. It becomes programmable as well as bi-directorial with the CPU and I/O interfaces. This enables you to send information as well as comm ... Read

  • Gold R4i Card
    By: JENSEN SITO | Dec 22nd 2009
    The R4i card is a prominent kind of card to turn on because it is cost effective product and has a very large range of functions. They were assembling with a mixture of gadgets in brain and as a result they invented such a great device from which you can expect to use this adapter card to quickly load programs and give you ... Read

  • Exercise Your Lungs For Better Breathing And Less Time Out Of Breath
    By: Roberto Bell | Jun 13th 2008
    Better breathing can improve performance whether you are a professional athelete or just want to feel better. Health benefits of improving the respiratory function include less time out of breath, improved focus, and better overall performance and wellness. Read


Copyright © 2005-2011 eArticlesOnline, LLC - All Rights Reserved
Terms of Service | Privacy Policy