LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   What are you're best Cron scripts? (http://www.linuxquestions.org/questions/programming-9/what-are-youre-best-cron-scripts-379058/)

deception 11-01-2005 03:55 PM

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.

deiussum 11-01-2005 04:08 PM

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.

fouldsy 11-01-2005 04:18 PM

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...).

Hko 11-01-2005 07:21 PM

A python script that puts names and e-mail addresses from an existing MySQL database into LDAP every night for use with Mozilla Thunderbird.

jonaskoelker 11-11-2005 03:17 AM

(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"

;-)

bigearsbilly 11-11-2005 04:04 AM

I've got one that reminds me when to visit the dentist ;)

fouldsy 11-11-2005 04:20 AM

Quote:

I've got one that reminds me when to visit the dentist ;)
*shudders* You want reminding of that :p ?

tangle 11-11-2005 07:37 PM

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.


All times are GMT -5. The time now is 11:27 PM.