How to script at job creation?
Bo Berglund
bo.berglund at gmail.com
Thu Dec 10 13:05:01 UTC 2020
On Thu, 10 Dec 2020 11:18:52 +0100, Bo Berglund
<bo.berglund at gmail.com> wrote:
>So I would like to create a script I can run in the target dir and it
>will create the 12 different at jobs in one command execution.
>
>Can this be done at all?
I found a way to get rid of the user interaction when creating an at
job as follows (all on one line):
echo "timeout --signal=2 65m getstream input18.mp4" | at 23:58
tomorrow
When executed on the command line it creates the at job without any
interaction at all, which was my first hurdle.
I will test putting a few of these commands into a script, which I can
then run daily to create the at jobs.
I probably should put a unique datestamp on the output mp4 file of
course, but that can be done in the script itself.
The getstream script packages a call to youtube-dl to download from a
live stream and the timeout of 65 minutes assures that a full hour is
available in the resulting file.
Without the timeout call youtube-dl continues downloading the stream
for 6h00m, which is not what I want.
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list