How To Automate Tasks In Your Host Server



Learn MPS Technology on mps-technology.net. How To Automate Tasks In Your Host Server article will help answer your questions on MPS Technology.We at mps-technology.net specialize in MPS Technology. MPS Technology at mps-technology.net provides the most up to date news and articles. If you have questions please do not hesitate to contact us.

Summary:
The first field(12 in this case) represents minute, the second field represents hour, third field represents day of month, fourth field represents month(1=Jan, 2=Feb and so on), fifth field represents day of week(0=sunday, 1=monday and so on).

Note: * means every time and # means comments.

To edit the crontab file, we use the crontab command like so:

'crontab [ -e |


Article:
If your host is running under the Linux (Unix) operating system, you can perform tasks in the server on a regular basis. For example, sending mails at a various time of the day, verification up database at 6 in the morning and so on. 'Cron' is a program that runs in the sphere of the Linux server. The program runs effectual bug defined by you at fixed time intervals. A tyical cron file will look something like this:

# My Sample Cron File 12 01 02 * * /usr/bin/du /var > /home/test/diskSpace.txt

Cron have lines consist of 6 whitespace separated fields. The first 5 fields are used to specify when to run the command, and the last field determines what issue a command to run. The first field(12 in this case) represents minute, the second field represents hour, third field represents day of month, fourth field represents month(1=Jan, 2=Feb and so on), fifth field represents day of week(0=sunday, 1=monday and so on).

Note: * means every time and # means comments.

To edit the crontab file, we use the crontab possess like so:

'crontab [ -e | -l -r ]'

The switch -e means to edit the current cron file. -l means to list the current file, and -r means to remove the current cron file. Try typing 'crontab -l' and you will see the cron file contents. To broadening the crontab command, you need to have SSH(Secure Shell) leap to the server. Basically, SSH allows you to type bug in the feedback signals prompt. If you have limited broadening to SSH, your host might provide some other ways to fit cron via the control panel.

For example, if I want to run a php script at 12 midnight everyday, I will type 'crontab -e', then write my script as follows:

0 0 * * * php /home/username/public_html/www.sitecritic.net.php

The adroitness that I run is 'php'. It is also recommended that you use full path reference to your script. In this case, it is /home/username/public_html/www.sitecritic.net.php.

In Conclusion, cron can save you alot of time and effort in doing daily repetitive tasks. By running a customised php script, you can automate the task of sending mass mails, certification up database, creating RSS feeds...etc.


WebMaster Media Maker. - Create Streaming Audio and Video with Media players that do not require a streaming media server.
How To Set Up A Web Server. - Instructions on how to set up your own web server from home.


Article Index: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29


Advice
Home Business
Technology
Online Advertising
Motivational
Internet Marketing
SEO Help
Online Games
Science Articles
Happiness

More Articles:


1. Schrader Serves Vital Role at aPriori Technologies
Summary: aPriori's Cost Management Platform empowers manufacturers to lower cost-of-goods sold (COGS), provides real-time visibility to 'cost-critical' decision information, and builds critical cost knowledge to go on the business 'offensive.' aPriori's patent-protected cost management platform allows companies to assess, control, and reduce cost of goods sold by whole percentages. Article:R. Sebastian Schrader is a co-founder and Senior Process Specialist with aPriori Technologies, based in Con…

2. Fire Department - Know How To Fireproof Your Data Center
Summary:Of all the cool technology in a data center, there's one system that no one ever wants to use or even have tested: the fire protection system. When building a new center, planning on incorporating systems such as these is essential, says Peter Sacco, president of design firm PTS Data Center Solutions. 'When you're constructing a new center, you're going to have to put in a different system than the rest of the building will have,' he notes. 'Most likely, every other part of the building …

3. Product Review: Paint Shop Pro
Summary: Just a one week training class and half a dozen graphics for a manual that I had to work on (at one of my consulting jobs many years ago.) So I cannot say that Paint Shop Pro is better or worse that the Adobe product.What I do know is Paint Shop Pro will easily meet the graphics needs of virtually all webmasters. This way you can draw a really nice looking tree without having to position and draw every leaf yourself.I would recommend this product without hesitation to any webmaster who …

4. Radar Detectors: What You Need To Know
Summary:Radar detectors have come a long way since they first hit the scene back in the 70's. This can make purchasing the right detector for your needs and situation seem difficult, but it need not be. The cost of radar detectors is usually a huge deciding factor for most people, but as with everything else, you will get what you pay for. Article:Radar detectors have come a long way since they first hit the scene back in the 70's. If you have found yourself getting too many speeding tickets, a…