LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-01-2005, 02:55 PM   #1
deception
LQ Newbie
 
Registered: Oct 2005
Location: NL
Distribution: Debian,Suse
Posts: 17

Rep: Reputation: 0
What are you're best Cron scripts?


Well, I don't have any. But like to know what people use.

For example:

Thunderbird backups, synchronise- backup favorites etc.

Grtz Deception.
 
Old 11-01-2005, 03:08 PM   #2
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 31
I recently wrote a cron script to backup my Subversion repository monthly. It creates a tarball that it puts into a backup directory, and also scps it to a folder on my Windows computer so that I have a copy of the backup on two computers. I can then easily burn the backups to a CD from either computer.
 
Old 11-01-2005, 03:18 PM   #3
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Our proxies at work all have the ability to block users, groups, classrooms, etc. at certain times of the day, so a cron job runs every hour based on the timing of the school bells. It's all PHP, but you didn't say what language your cron scripts had to be The script queries a MySQL database to work out what it needs to ban / unban for the following period, queries an LDAP server to retireve associated groups and their members if required or parses the output of a load of nslookup queries to find IP addresses of workstations set to be banned. It then updates relevant Squid or DansGuardian files, updates the MySQL database so the web front-end displays the correct status for users/groups/rooms banned, and then restarts the appropriate services.

I knocked it up during my lunch hour (spread out over about 2 weeks...).
 
Old 11-01-2005, 06:21 PM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
A python script that puts names and e-mail addresses from an existing MySQL database into LDAP every night for use with Mozilla Thunderbird.
 
Old 11-11-2005, 02:17 AM   #5
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
(job 1) synchonize the list of packages with the debian repositories (apt-get update), then download all upgradable packages (apt-get dist-upgrade -d).

(job 2) check the bug tracking system to see if any of my pinned packages still opens bugs when upgrading into the newest version.

(job 3--not implemented yet) find all emacs backup files (find -name '*~')

(job 4) * * 1 1 * echo "happy new year"

;-)
 
Old 11-11-2005, 03:04 AM   #6
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,287

Rep: Reputation: 173Reputation: 173
I've got one that reminds me when to visit the dentist
 
Old 11-11-2005, 03:20 AM   #7
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Quote:
I've got one that reminds me when to visit the dentist
*shudders* You want reminding of that ?
 
Old 11-11-2005, 06:37 PM   #8
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,744

Rep: Reputation: 70
Maybe not a well written one, but my favorite is the one that mounts a share on my file server and backups up my webserver.
 
  


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
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
cron scripts kirmet Programming 1 10-20-2005 12:37 PM
expect scripts and cron banderson Linux - Software 8 05-27-2005 04:44 AM
can echo be used for popups in shell scripts run by cron? dr_zayus69 Linux - Software 4 04-12-2005 06:30 PM
How to retrieve email from cron scripts ? wallywood Linux - General 1 03-05-2004 03:34 PM


All times are GMT -5. The time now is 11:59 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