Score:0

VLC with crontab

qa flag

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.

vn flag
[This](https://askubuntu.com/a/1288948/349837) might help
rfm avatar
mk flag
rfm
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.
Dave avatar
za flag
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?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.