Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-25-2006, 09:24 PM
|
#1
|
|
Member
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 272
Rep:
|
cron tab, what do you use it for?
We use cron tabs at work to schedule various scripts, but what would I use this for at home? I know I can use it to schedule a backup or that sort of thing.
But what I'm curious about is what everyone uses cron tabs for. What do you schedule on your home computer?
This is just a curiosity type of thing. I'm also wondering if I'm missing something. Could I be making better use of my system?
Thanks
F_M
|
|
|
|
09-25-2006, 11:07 PM
|
#2
|
|
Senior Member
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249
Rep:
|
I use it to sync my portage tree. Logroller uses it for me. I also plan on using it to run "updatedb" on a regular basis, but I haven't got to it yet. There are a lot of other things you can do with it I have no need for as of right now. On the same hand though there a lot of things I can do with it I just don't right now.
|
|
|
|
09-26-2006, 12:17 AM
|
#3
|
|
Member
Registered: Nov 2001
Location: California
Distribution: Slackware 14.0
Posts: 265
Rep:
|
Some of the processes in my crontab (most run nightly):
Download new patches from Slackware mirror
Download various podcasts
Download new virus definition files
Run virus scanner
The above processes also send an email if any action was taken (file downloaded, virus found, etc.) or any errors occurred.
|
|
|
|
09-26-2006, 08:10 AM
|
#4
|
|
Senior Member
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249
Rep:
|
I don't have any of mine send me e-mail. I run them on good faith :-), that is a good idea though.
|
|
|
|
09-26-2006, 08:42 AM
|
#5
|
|
Moderator
Registered: Aug 2002
Posts: 10,689
|
My lawn sprinkler system runs via cron.
Some of my outside lights turn on via cron based on sunset times.
|
|
|
|
09-27-2006, 07:20 PM
|
#6
|
|
Member
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 272
Original Poster
Rep:
|
Never thought about the podcasts, good idea.
And michaelk, do you have your house automated?
|
|
|
|
09-27-2006, 07:47 PM
|
#7
|
|
Moderator
Registered: Aug 2002
Posts: 10,689
|
Yes, its still a project in work.
|
|
|
|
09-28-2006, 03:32 AM
|
#8
|
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,466
Rep: 
|
Currently, I have cron jobs set up to update the locate database and do log rotation (these were already set up in Slack, I just had to change the settings so they'd run at a more convenient time). I'll set one up for removing temp files, too.
|
|
|
|
09-28-2006, 07:42 AM
|
#9
|
|
Senior Member
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249
Rep:
|
I found a wiki article on removing the temp files using cron on the Gentoo Wiki. How safe is that? Is there something I need to watch out for when removing temp files?
|
|
|
|
09-28-2006, 09:55 AM
|
#10
|
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,466
Rep: 
|
I was also wondering about how safe it is, which is why I've not made a job yet.
|
|
|
|
09-28-2006, 10:24 AM
|
#11
|
|
Member
Registered: Apr 2004
Location: Statesboro, GA
Distribution: Arch Linux 2007.05 "Duke" (Kernel 2.6.21)
Posts: 447
Rep:
|
I have my crontab set up to run Archstats (a stat reporting program for Arch Linux), download and install the latest packages for Arch, and as an alarm to wake me up most mornings.
|
|
|
|
09-28-2006, 11:44 AM
|
#12
|
|
Member
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542
Rep:
|
I wrote a little script which copies the /root/.bash_history file to a backup location and append the date to the filename. I also insert date into the .bash_history file so I know what day commands were run. This comes in handy at times.
I run the script once a day via cron.
I also use cron to run a script to check for disk space availability. (df -h) And it emails me if the output of the df is over 75%.
|
|
|
|
09-28-2006, 02:54 PM
|
#13
|
|
Member
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249
Rep:
|
Quote:
|
Originally Posted by DotHQ
I also insert date into the .bash_history file so I know what day commands were run. This comes in handy at times.
|
Hmm, you might want to check out the HISTTIMEFORMAT environment variable. I use zsh myself so I don't know if that's what you're looking for. From bash man page:
Quote:
|
If this variable is set and not null, its value is used as a format string for strftime(3) to print the time stamp associated with each history entry displayed by the history builtin. If this variable is set, time stamps are written to the history file so they may be preserved across shell sessions.
|
I'm currently using crontab to record TV (dvb) because I can't be arsed to install MythTV/etc, I just wrote a couple of wrapper scripts around mencoder.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:00 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|