0

Ubuntu noob here using 20.04.3. I'm trying to schedule the opening of an RTSP stream in VLC using crontab, but I'm having a heck of a time getting it to work.

My vlc command works fine in terminal and a .sh executable. Moving to my crontab file, I've attempted to use the DISPLAY:=0.0 qualifier, but nada. I've tried calling my vlc command from a .sh executable and then calling the .sh from crontab, but nada.

I've also tried the "at" command as well as systemd timers, but nothing seems to fit the bill. I'm just trying to open an RTSP feed at one time and then close it at another time. Any tips to make that happen would be appreciated.

  • 2
  • Can you give us a higher-level description of what you're trying to accomplish? cron jobs are normally just background tasks which create no disolay. I think what you might want is a systemd user timer unit, but I can't really tell. – rfm Jan 06 '22 at 05:01
  • Did you use full paths for all applications and files in the .sh file? When cron runs you're going to need a full path. IE: instead of just 'ls' you'd need '/bin/ls'. This isn't always the problem, but being it works when run by hand, it'd be one of the first things I checked. Maybe post the script code? – Dave Jan 06 '22 at 07:32

0 Answers0