LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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

Reply
 
Search this Thread
Old 09-25-2006, 09:24 PM   #1
Fritz_Monroe
Member
 
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 272

Rep: Reputation: 30
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
 
Old 09-25-2006, 11:07 PM   #2
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
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.
 
Old 09-26-2006, 12:17 AM   #3
speck
Member
 
Registered: Nov 2001
Location: California
Distribution: Slackware 14.1
Posts: 274

Rep: Reputation: 54
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.
 
Old 09-26-2006, 08:10 AM   #4
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
I don't have any of mine send me e-mail. I run them on good faith :-), that is a good idea though.
 
Old 09-26-2006, 08:42 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
My lawn sprinkler system runs via cron.
Some of my outside lights turn on via cron based on sunset times.
 
Old 09-27-2006, 07:20 PM   #6
Fritz_Monroe
Member
 
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 272

Original Poster
Rep: Reputation: 30
Never thought about the podcasts, good idea.

And michaelk, do you have your house automated?
 
Old 09-27-2006, 07:47 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
Yes, its still a project in work.
 
Old 09-28-2006, 03:32 AM   #8
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
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.
 
Old 09-28-2006, 07:42 AM   #9
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
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?
 
Old 09-28-2006, 09:55 AM   #10
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
I was also wondering about how safe it is, which is why I've not made a job yet.
 
Old 09-28-2006, 10:24 AM   #11
xpromisex
Member
 
Registered: Apr 2004
Location: Statesboro, GA
Distribution: Arch Linux 2007.05 "Duke" (Kernel 2.6.21)
Posts: 447

Rep: Reputation: 30
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.
 
Old 09-28-2006, 11:44 AM   #12
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542

Rep: Reputation: 33
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%.
 
Old 09-28-2006, 02:54 PM   #13
soggycornflake
Member
 
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249

Rep: Reputation: 31
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me... Linux Server.. With Plesk.. Cron Tab 00tbone00 Linux - General 1 07-15-2006 01:16 AM
cron tab thefedexguy Suse/Novell 4 07-06-2006 11:03 AM
FC 4. Modify ALT+TAB behaviour to CTRL+TAB xtracto Linux - Software 1 09-22-2005 02:06 PM
creating a cron(tab) scheduled thing student04 Linux - Software 5 12-26-2004 09:18 PM
Redirecting output of tab tab benjaminrtz Linux - General 1 04-28-2003 10:11 AM


All times are GMT -5. The time now is 04:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration