Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 11-01-2005, 03:55 PM   #1
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, 04:08 PM   #2
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
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, 04:18 PM   #3
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, 07:21 PM   #4
Senior Member
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 110Reputation: 110
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, 03:17 AM   #5
Senior Member
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
(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, 04:04 AM   #6
Senior Member
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,421

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

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

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


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 09:09 AM
cron scripts kirmet Programming 1 10-20-2005 01:37 PM
expect scripts and cron banderson Linux - Software 8 05-27-2005 05:44 AM
can echo be used for popups in shell scripts run by cron? dr_zayus69 Linux - Software 4 04-12-2005 07:30 PM
How to retrieve email from cron scripts ? wallywood Linux - General 1 03-05-2004 04:34 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:32 AM.

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