PDA

View Full Version : [VU+ Duo2] Cron timers



maracsx
05-11-15, 10:35
Hello guys,

can anybody help me how to put cron timer that remote control command "EXIT" be activated in 01.00 Daily.

I tried to add cron timer 'root' I've put the following code in root file in /etc/cron/root



30 * * * * /usr/bin/ntpdate-sync silent
wget -q wget -q http://127.0.0.1/web/remotecontrol?command=174


but nothing happens.

I need that because "Behavior after movie reach the end" - "return to service" is nto workign properly. After movie reach the end it "return to movie list"

birdman
05-11-15, 11:20
The first 5 fields in a crontab file are:
field allowed values
----- --------------
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)(although you might not be able to use names here...). A * in a field means "any value" (so * * * * * gets run every minute...).
Or read the readme.txt file in /etc/cron/crontabs/.

So, the line you need would be:
00 01 * * * wget -q http://127.0.0.1/web/remotecontrol?command=174Whether it is the correct thing to do is another matter.

maracsx
05-11-15, 11:48
Thanks. What I should I put in vu duo2 menu, under "command to run" ?

birdman
05-11-15, 16:28
Well - the command you gave is wrong in two ways. The PATH_INFO is wrong, and the command will try to right the result to a file called remotecontrol?command=174, which is an invalid file on the vfat file-system I was in while testing on my MBTwin (so an error was reported), but not illegal on my Linux laptop (which therefore worked). [I ended up running strace to resolve that one...].
So, the command you would need is:
wget -q -O /dev/null 'http://mbtwin/api/remotecontrol?command=174'

But the reference to "the correct thing" was that the issue should be fixed, not worked around.