Wednesday, March 25, 2009

Automatic Pidgin

I keep having a minor problem with PidginCarrier -- I leave it on at work, and then when I'm at home, messages end up at work where I don't see them until the next day. If I do remember to turn it off before heading home, I'll forget to turn it on until someone reminds me. So I set up a crontab task to start and stop PidginCarrier both at home and at work:

At work I set it like this:

crontab -e

# m h dom mon dow command
0 8 * * 1-5 export DISPLAY=:0 && pidgincarrier
0 18 * * * killall pidgincarrier

This starts PidginCarrier every weekday at 8 am, and turns it off every evening at 6 pm.

At home I have this:

# m h dom mon dow command
0 8 * * 1-5 killall pidgincarrier
0 18 * * * export DISPLAY=:0 && pidgincarrier

So at 8 am every weekday PidginCarrier at home is shut off, and turned back on every evening at 6 pm.