Cron [What do *you* use it for?]

DarkSabreTribal

Veteran XV
Just interested in what other people have automated.

Here's what I have set up:
Code:
#CRONTAB FILE 
# Classic crontab format:
# Minutes Hours Days Months WeekDays Command

#----AlarmClock----
30 4 * * * "C:\cron\Winamp\winamp.exe"

20 7 * * 1 C:\cron\WakeUp1.bat
45 7 * * 2 C:\cron\WakeUp2.bat
30 7 * * 3 C:\cron\WakeUp3.bat
45 7 * * 4 C:\cron\WakeUp4.bat
20 7 * * 5 C:\cron\WakeUp5.bat
#20 7 * * 6 C:\cron\WakeUp5.bat
#20 7 * * 7 C:\cron\WakeUp5.bat

#----Desktop Background----
01 7 * * 1 "C:\cron\Desktop (10).bat"
01 7 * * 2 "C:\cron\Desktop (9).bat"
01 7 * * 3 "C:\cron\Desktop (8).bat"
01 7 * * 4 "C:\cron\Desktop (3).bat"
01 7 * * 5 "C:\cron\Desktop (5).bat"
01 7 * * 6 "C:\cron\Desktop (1).bat"
01 7 * * 7 "C:\cron\Desktop (7).bat"

#----DataMiners----
* * * * * C:\Perl\bin\wperl.exe C:\cron\dminer_tw.pl www.tribalwar.com/forums/index.php
* * * * * C:\Perl\bin\wperl.exe C:\cron\dminer_tw2.pl www.tribalwar.com/forums/index.php

#----Startup----
? ? ? ? * "C:\Applications and Utilities\etmin.exe"
? ? ? ? * "C:\Applications and Utilities\No-IP\DUC20.exe"
? ? ? ? * "C:\Applications and Utilities\Fraps\fraps.exe"

#----Other----
30 21 * * * "C:\Games\Wolfenstein - Enemy Territory\WhosGaming.bat"
 
I had it set up as an alarm but it didn't work so I turned it off.

..I use to have it setup to run a backup script I wrote when I was developing my own DE using fvwm.
 
Oh, I was just thinking about setting up some cron stuff last week. I want to write a script that sorts through some of my mail boxes and cleans out spam and such.

Any good cron tutorials out there?
 
I'm in a contentious situation with a supervisor at an employer. I have a script set up in cron to check an email account every set time interval. If I email a certain "kill switch" to an email account, it will render the server in to a non-functional state.
 
I cron everything and I'm working on cronning myself out of a job. Here's the latest.

Problem to solve: I love CBC's As It Happens, but I'm not always near the radio when it's on. The cron calls the script, and the script records the ogg stream to /htdocs and kills itself after 90 minutes when the show's over.

Code:
# Record AIH daily
30 18 * * * /home/anthem/recordcbc.sh

Code:
~# cat recordcbc.sh

#!/bin/bash
runtime=${1:-90m}
mypid=$$
# Run aih in background
/usr/bin/vlc --intf dummy --http-caching 5000 mms://a888.l961736887.c9617.g.lm.akamaistream.net/d/888/9617/v0001/reflector:36887 --sout '#transcode{acodec=vorb,ab=96,channels=2}:duplicate{dst=std{access=file,mux=ogg,dst=/var/www/htdocs/public/stream.ogg}}'&
aihpid=$!
#Sleep for the specified time.
sleep $runtime
kill -s SIGTERM $aihpid
mv /var/www/htdocs/public/stream.ogg /var/www/htdocs/public/`date '+%y%m%d'`.ogg
 
Last edited:
I don't TELL them I've cronned it all, they just think I'm really anal and mail out my network status reports at exactly 2:37 every morning (also showing that I'm working to all hours.)

First one does a daily nmap and compares it to the previous one to see if anybody attached any devices or opened new ports on the company network.

Second one does a weekly nessus scan and posts the results to a web page.

What I'm working on now is for the first to trigger the second, so any network change automatically get its ass nessussed.
 
Last edited:
Any good cron tutorials out there?

Any cron tutorial will just show you syntax for the timing of what you're running. What you need is scripts (or windows "batches"*) that do all the dirty work. cron just runs those on a schedule.

I had another one back in the TWS.net days to wget a daily map of TW's asskicking.

Hey where's you awesome sig? ...or was that Thanatos?

*Batches? We don' need no steenkin' batches!
 
Back
Top