You are not logged in.
Pages: 1
Hi there.
As the subject tells, crontab cannot execute rtorrent. I tried various ways but with no result.
First add rtorrent to crontab
00 07 * * * rtorrentSecond use the full path
00 07 * * * /usr/bin/rtorrentThird use screen with different options. Even with full path.
00 07 * * * screen /usr/bin/rtorrentBut there is noway. Rtorrent does not start at the time I determined.
I am totally frustrated. Is there anything I forget?
I have to mention all these command works correctly in the bash but in cron there is no way. For example screen /usr/bin/rtorrent start rtorrent perfectly but when I use this inside the cron, nothing happens. I even wrote a two line script for this and force cron to execute that script but it does not work.
I Google all this week but cannot find a solution to settle this problem.
Last edited by eMan (2015-06-26 17:40:24)
Offline
cron only works for jobs that return or fork after executing the command. Both rtorrent and screen do not fit this requirement. Try `screen -dm rtorrent` to have screen return automatically as described in the manpage:
-d -m Start screen in "detached" mode. This creates a new session but doesn't attach to it. This is useful for system startup scripts.
Offline
Thank you so much Spider. With your help now everything is good here.
I start the app by this line in cron
05 02 * * * /usr/bin/screen -dm -s tr rtorrentAnd stop it with following line
05 07 * * * /usr/bin/screen -X quitOffline
Pages: 1