Score:0

Autorun script after boot with delay

cn flag

I would need some help of this forum. I have a script which uses ffmpeg and when I run it from the terminal ./kamera1.sh it works all fine.

Now I would like to autorun the script eg. 3 minutes after start-up. Alltogether there are 3 cameras and every camera has its own script file.

Then the question, what would be the best way autonrun all the 3 scripts 3 minutes after Ubuntu starts up? So that there would be 3 terminals open in the end.

#!/bin/sh

#Grab snapshot from RTSP-stream
ffmpeg -rtsp_transport tcp -i > rtsp://admin:[email protected]:554/Streaming/Channels/101/ -s 1280x960 -vf fps=1/3 Kamera1_%07d.jpeg

#Delete previous taken snapshots older than 14 days
find /home/omistaja/Kuvat/kamera1/ -name '*.jpeg' -mtime +14 -delete

vanadium avatar
cn flag
Does this answer your question? [Delay startup application in Xubuntu](https://askubuntu.com/questions/809479/delay-startup-application-in-xubuntu)
s3idani avatar
cn flag
what do you mean by _"there would be 3 terminals open in the end"_ ?
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.