[olug] cron job

Eric P eric.maillist at gmail.com
Tue Aug 2 01:43:02 UTC 2005


Jake Churchill wrote:
> 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:
> 
> #!/bin/sh
> 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?
> 

killall xmms



More information about the OLUG mailing list