0

I have an issue about how to run screen through crontab, I made a script which check if a previous session is running and if not restart a screen. cf screenshots below

crontab

restard_td.sh

When I run the script manually it's works fine, by cron, i can see my output "down, i will restart it " in my log file but no screen available and my script doesn't run.

Has someone got an idea ?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

2 Answers2

0

you can try checking the cron log, and use the screen full path.

Maoz Zadok
  • 4,871
  • 3
  • 33
  • 43
0

I fixed it by using screen full path and python full path in my script. like that

/usr/bin/screen -dmS team /usr/local/bin/python /home/admin/scripts/rattrapage/team.py