Automating Tasks in Linux using Cron

Written by Vinu Thomas


Continued from page 1

21 1 1 * * /home/accont/clearaccount.sh

* Let's see how to schedule a task to run only on weekdays(monday to friday)

0 10 * * 1-5 /home/account/cleartemp.sh

Adding and Editing Entries in Crontab and Now that you know how crontab entries are formated, it's time to put some of your entries intorepparttar crontab list. To do this, you can userepparttar 107744 crontab command. By specifyingrepparttar 107745 -e option, you'll be taken torepparttar 107746 default text editor to add and edit your crontab list. [crontab -e]

Another method of manipulating your crontab entries is to create and save a text file with your crontab entries. You can load your list into crontab by usingrepparttar 107747 following command: [crontab mycrontablist] where mycrontablist isrepparttar 107748 file containing your entries.

Viewing Crontab: [crontab -l]

You can view your current crontab list by specifyingrepparttar 107749 -l option. Issuing this command will print out a list of all your current jobs inrepparttar 107750 crontab list

Removing Crontab: [crontab -r]

The -r option removes your current crontab file. Issuing this command will emptyrepparttar 107751 contents ofrepparttar 107752 current user's crontab file

Output from cron

Usuallyrepparttar 107753 output of cron gets mailed torepparttar 107754 owner ofrepparttar 107755 process orrepparttar 107756 person or email id specified inrepparttar 107757 MAILTO variable. To setrepparttar 107758 MAILTO variable, you'll have to addrepparttar 107759 following command torepparttar 107760 top of your crontab : MAILTO="your_email_address@domain.com"

If you have a command that is run frequently, and you don't wantrepparttar 107761 output to be emailed each time, you can redirectrepparttar 107762 output to a log file cmd >> log.file, so your job would be something like this.

0 18 * * * /home/user/backup.sh>>log.file

If you don't want any output at all, you can redirectrepparttar 107763 output to a null file : cmd>>/dev/null

0 18 * * * /home/user/backup.sh>>/dev/null

Vinu Thomas is a consultant on Web design and Internet Technologies. His website is http://www.vinuthomas.com. You can read more articles on Linux @ http://www.vinuthomas.com/sections-listarticles-6.html


Internet Explorer Shortcuts

Written by Rick Yost


Continued from page 1

Pressrepparttar F5 key to reloadrepparttar 107743 page. Press F4 & F5 atrepparttar 107744 same time to haverepparttar 107745 page reloaded atrepparttar 107746 page top instead of wherever you had scrolled to.

Pressrepparttar 107747 Esc key to stoprepparttar 107748 current page from loading.

Press CTRL + N to openrepparttar 107749 current page in a new window.

Allrepparttar 107750 usual shortcuts work too. CTRL + P opensrepparttar 107751 print dialog, CTRL + A highlights everything onrepparttar 107752 page, CTRL + C copies what you have highlighted.

Have you ever come across a web page whererepparttar 107753 text was too large or too small to read easily? If you have a mouse with a wheel and use Internet Explorer, just hold downrepparttar 107754 Ctrl key and rollrepparttar 107755 wheel. The text will get smaller or larger depending which way you rollrepparttar 107756 wheel. Neat!

Netscape users and users without a wheel mouse will have to go torepparttar 107757 view menu to change text sizes. Netscape reloadsrepparttar 107758 entire page, IE resizesrepparttar 107759 text without reloadingrepparttar 107760 page.

Rick Yost is a free lance author both online and off. Being involved as publisher and editor of the local community paper where he resides for over two years has given Rick the knowledge and experience that enables him to put to paper his delicious sense of humour as well as his ability to keep the reader reading. The honest and straight to the point methods he incorporates into his style of writing are a joy to read. Now online! http://www.abetterlover.com


    <Back to Page 1
 
ImproveHomeLife.com © 2005
Terms of Use