What is the best way to run a bash script periodically?

This is general talk area for things that NOT RELATED WITH TV! Instead, about internal works like web site, forum, wiki, or talking, etc...

sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: What is the best way to run a bash script periodically?

Post by sectroyer »

In your init you should launch script (with &) that will have the loop :) That's how you should do it :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
smart_lover
SamyGO Project Donor
Posts: 161
Joined: Sun May 03, 2015 6:11 am

Re: What is the best way to run a bash script periodically?

Post by smart_lover »

sectroyer wrote:In your init you should launch script (with &) that will have the loop :) That's how you should do it :)
Actually I confused. How can I launch my script in init?

In which place of following script(my script) I have to place '&'?

Code: Select all

#!/bin/sh

upSeconds="$(cat /proc/uptime | grep -o '^[0-9]\+')"
upMins=$((${upSeconds} / 60))

until [ "${upMins}" -gt "2880" ] ; do
   sleep 30m
   upSeconds="$(cat /proc/uptime | grep -o '^[0-9]\+')"
   upMins=$((${upSeconds} / 60))
done
samyGOrc -p $(pidof exeTV || pidof exeDSP) 152
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: What is the best way to run a bash script periodically?

Post by sectroyer »

At:
yourscriptsname.sh & <<<<<----- HERE :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
smart_lover
SamyGO Project Donor
Posts: 161
Joined: Sun May 03, 2015 6:11 am

Re: What is the best way to run a bash script periodically?

Post by smart_lover »

juusso wrote:
smart_lover wrote:Does this lib works in H series?
I guess it should. Try and tell us ;)
It works very well.

Post Reply

Return to “General”