2013-06-06 19:07:20 +00:00
|
|
|
This is notes for video: https://www.youtube.com/watch?v=N3NyZzMN_Uw
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# to open crontab with commandline editor
|
|
|
|
crontab -e
|
|
|
|
|
|
|
|
# to open crontab with gui editor
|
|
|
|
env EDITOR=xdg-open crontab -e
|
|
|
|
|
|
|
|
|
2013-06-06 19:13:53 +00:00
|
|
|
to test if crontab is working try to outputting a log file
|
2013-06-06 19:07:20 +00:00
|
|
|
exmaple:
|
|
|
|
* * * * * ~/Scripts/timebomb.sh > /tmp/timebomb_error.log 2>&1
|
|
|
|
|
2013-06-06 19:13:53 +00:00
|
|
|
note: one of the most common reasons crontab doesnt work
|
|
|
|
is because it wants you to put the absolute path to an app/location
|
|
|
|
|
|
|
|
Ex:
|
|
|
|
transmission-gtk
|
|
|
|
vs
|
|
|
|
/usr/bin/transmission-gtk
|
|
|
|
|
|
|
|
# use the which command to figure it out the path
|
|
|
|
which transmission-gtk
|
2013-06-06 19:07:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
----------------
|
|
|
|
## for crontab
|
|
|
|
|
|
|
|
# to run flexget without generating log files
|
2013-06-06 19:13:53 +00:00
|
|
|
@hourly /usr/bin/flexget --cron
|
2013-06-06 19:07:20 +00:00
|
|
|
|
|
|
|
# start transmission-gtk version minimized if it is not already running
|
|
|
|
*/30 * * * * export DISPLAY=:0 && if pidof -x /usr/bin/transmission-gtk; then exit; else /usr/bin/transmission-gtk -m; fi &
|
|
|
|
|
|
|
|
# this is for transmission-cli/daemon version
|
|
|
|
@hourly if pidof -x /usr/bin/transmission-daemon; then exit; else /usr/bin/transmission-daemon; fi &
|
|
|
|
|