Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5970

crontab cannot start tmux session (Ubuntu) [closed]

$
0
0

I can start any tmux session myself, and they work. I can see them in ps -ef or whatever ps command.

tmux new-session -d -s my_tmuxsess 'python3 my_pyscript.py'

However, if I want to start it with crontab, it doesnt work. Nothing in ps output.

38 10 * * * tmux new-session -d -s my_tmuxsess 'python3 my_pyscript.py'

Update:I just tried with below. No success

38 10 * * * . $HOME/.profile; tmux new-session -d -s my_tmuxsess 'python3 my_pyscript.py'

kill works in crontab, e.g.:

38 10 * * * kill -9 56

/var/log/cron.log only has

(root) RELOAD (crontabs/root)

(root) CMD (tmux new-session -d -s my_tmuxsess 'python3 my_pyscript.py')

Update2: Not sure if the issue is with the ubuntu container I made in docker desktop. root is the only user and both home and root directories are empty. So .profile does not exist


Viewing all articles
Browse latest Browse all 5970

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>