Answer the question
In order to leave comments, you need to log in
Is there any way to run the script at intervals and output its result?
DD.
You need something like a hybrid of crontab and "tail -f ..
" I want to run something like this:
utilName -f --command = '* * * * * php /cron.php'
and the utility runs this script once a minute and shows its result, as soon as I complete the "ctrl + C" task, nothing else happens.
Of course, you can make an entry in crontab, output the result to which file and hang "tail -f" on this file.
but then I can forget about the crontab entry
Answer the question
In order to leave comments, you need to log in
Write a script that will run your command indefinitely in a circle. As a "minute separator" use sleep 60
Accordingly, when you interrupt it with ctrl-c, everything will stop.
Here are the options
https://stackoverflow.com/questions/1289026/syntax...
https://www.cyberciti.biz/faq/bash-for-loop/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question