Results 1 to 5 of 5
Hi,
I want cron to execute a script at a certain time which sends a command to a detached tmux/screen session.
I have already started a session with "tmux new ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-15-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 4
crontab does not execute script or command containing tmux or screen?
Hi,
I want cron to execute a script at a certain time which sends a command to a detached tmux/screen session.
I have already started a session with "tmux new -d -n stuffn -s stuffs "blah" OR screen -dmS stuffs blah.
I then put "tmux send -t stuffs:stuffn "blah" C-m OR screen -x stuffs -X stuff "blah" in a script to send command to detached session. I ran the script manually it worked but when put in cron nothing happens. The cron script looks like "46 17 * * * /bin/sh /location/script.sh".
Putting the command directly in cron also doesnt do anything. I am sure cron is working itself.
Does anyone have an idea of whats going on?
Thanks in advance!
- 05-20-2011 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,694
w/out looking at the screen/tmux stuff, what about redirecting the output of your cronjob to a log and see what it says? e.g.:
Code:46 17 * * * /bin/sh /location/script.sh > /tmp/script-out.log 2>&1
- 05-20-2011 #3Just Joined!
- Join Date
- May 2011
- Posts
- 4
- 05-20-2011 #4Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,694
that is good!
- 05-20-2011 #5Just Joined!
- Join Date
- May 2011
- Posts
- 4
Thanks!


Reply With Quote

