[olug] cron job

Jake Churchill jachurchill at cox.net
Mon Aug 1 18:46:57 UTC 2005

How do I set a cron job to kill an application at a given time.  I have
cron jobs set to start X applications.  For example, my alarm is set via
cronjob to start an XMMS playlist.  I have a shell script to do this:

export DISPLAY=:0.0
/usr/bin/xmms /home/<username>/Desktop/Playlist.m3u

I need to create a script to kill it and I can't figure out the string
using ps aux | grep xmms.  I know I need a variable in there somewhere
to catch the PID of xmms and then I pass that to kill but I'm having a
hard time.  Someone once sent me code to do this and I lost it when I
installed  SuSE.  Any suggestions?


More information about the OLUG mailing list