Stand With Ukraine

Wednesday, July 7, 2010

Set up alarm using crontab

I used crontab in order to get waked up in the morning (here at 7:50) by some song from youtube I like.
In home directory I created 2 files: alarm.sh and mycrontab. And then just issued the command:
crontab mycrontab

Contents of mycrontab:

50 7 * * * cd $HOME && ./alarm.sh

Contents of alarm.sh:

#!/bin/bash
export DISPLAY=:0.0
/usr/bin/firefox "http://www.youtube.com/watch?v=ebBBdJSHzJk&feature=PlayList&p=C262E364FC4756AF&playnext_from=PL&index=18&playnext=2"

No comments: