Manual Cron Job

Phantom_Zone

Vu+ Newbie
Hi All,

I'm running the latest BH image and am trying to create a cron job to run a script every 10 minutes,

could someone enlighten me? crontab -e returns 'no such file or directory' so I'm at a loss!!
 

Tamaki

Administrator
Hi All,

I'm running the latest BH image and am trying to create a cron job to run a script every 10 minutes,

could someone enlighten me? crontab -e returns 'no such file or directory' so I'm at a loss!!

You could put your script in /etc/bhcron/bh.cron and in /etc/bhcron/root

You should add a line like:
10 * * * * /usr/script/yourscript.sh
 

dragon7

Vu+ Newbie
Hi!
I am looking for help setting a cron job so it does not work when i switch my box to standby.
It looks like this now:
*/4 * * * * touch /media/hdd/keepalive.log
and it does what it is intended for but I would like that it does not do it all the time and that the hdd gets some rest while the box is on standby.
I read that I need to use if or while to condition the job to work only when the box is active/on, but I have no clue how to do it.
Any help, please...
 

paperino61

Vu+ User
Hi!
I am looking for help setting a cron job so it does not work when i switch my box to standby.
It looks like this now:
*/4 * * * * touch /media/hdd/keepalive.log
and it does what it is intended for but I would like that it does not do it all the time and that the hdd gets some rest while the box is on standby.
I read that I need to use if or while to condition the job to work only when the box is active/on, but I have no clue how to do it.
Any help, please...

Hi. You can put at the begin of your script, someting like this:
if (wget -O - http://localhost/web/powerstate? | grep -q "false")
then
...code to execute if STB is ON
......
------
else
...lines to execute if STB is in STANDBY
exit 0
fi
in this case, if the STB is in standdby mode, nothinhg happens (only "exit 0")

hope thes helps....

g.
 
Top