You are here

Help with Auto Update on Raspberry Pi

22 posts / 0 new
Last post
Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days
Help with Auto Update on Raspberry Pi

Hi Guys, new to WebGrab++. running version v5.0.1.0 on Raspberry pi 4.
Im trying to setup a cron to update the xmltv guide. I would like it to run at 1am every morning.
WebGrab is installed in the following directory = /home/pi/apps/.wg++
Could somebody help me out please.
Thanks in advance guys..!!

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

ur using a pretty old wg version,i would update it myself to latest(dotnet 8 required).

0 1 * * * dotnet /home/pi/apps/.wg++/bin.net/WebGrab+Plus.dll /home/pi/apps/.wg++ > /home/pi/apps/.wg+/wg.log 2>&1
you can omit this part if you dont want a console log(u will still have your webgrab log file)
> /home/pi/apps/.wg+/wg.log+ 2>&1
also u may need to run as root user
0 1 * * * root dotnet /home/pi/apps/.wg++/bin.net/WebGrab+Plus.dll /home/pi/apps/.wg++ > /home/pi/apps/.wg+/wg.log 2>&1

make sure u add the crontab logged in as the user you want it to run under.
if u with to run as root u can run sudo crontab -e from any user.

Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days

Thanks for the quick reply. i recently installed WG following the guide on this site. i'll look into updating to the latest version now. Thanks again for your help..

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

oops i forgot to include the dotnet command
check above post again.

even easier is to use the run.net.sh file you use to run it manually
0 1 * * * /home/pi/apps/.wg++/run.net.sh > /home/pi/apps/.wg+/wg.log 2>&1

to run wg manually the syntax is..
/path/to/wg/dll /path/to/wg/directory

the run.net.sh searches for the install directory and dotnet as every users filesystem is different.
i never use it,i do it all manually as my filesystem(username) is fixed.

Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days

OK, Thanks again for your help.

Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days

just tried installing the crontab and i get the message "no crontab for pi - using an empty one" im logged in as pi

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

i assume ur pli image doesnt have a default crontab file.
what linux distro?
almost all have a default file with no entries.
usually a commented section at the top on how to add a entry.
if u can add the enrty set it for a few minutes from now and see if wg runs.
0 1 * * * is 1 am daily
15 1 * * * is 1:15am daily
it uses military time
0 21 * * * 9pm daily

usually you see something like screenshot..

Attachments: 
Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days

im running raspberry pi lite os "no desktop"
i was able to add the line into nano.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

see if it works.
i would keep the redirect > part i mentioned above.
if it dont work the log may contain something usefull,u can always remove it later once u know it works.
also these stripped down OS lack alot features,maybe crond is one?

try./.
crondtab -v in terminal

Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days

I'm just going to try a grab now.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

-v is not a valid flag but it should tell you if its installed.

Attachments: 
Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

btw i forgot,easy way to test is use..
* * * * *
this means run every minute.
course u need to manually kill webgrab or it will start another instance every minute until u change it back to..
0 1 * * *

killall dotnet with shut wg down as it runs under dotnet.

Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days

Its not working

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

you prob dont have crond in ur stripped down OS

if u run this in terminal
/home/pi/apps/.wg++/run.net.sh

i am surer it will run.

Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days

yes it does run

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

i have no idea what your "raspberry pi lite os" is based on.
they must have forums?
u should ask there.

Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days

ok. i just tried installing cron and it said that its already installed.
Who knows. I'll try a fresh install tomorrow and see if i get any other results with a full OS.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

crontab -e
show ask u to select a editor then

Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days

yes. i chose nano

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

ok.
what line are you trying for the entry.

Daffy
Offline
Donator
Joined: 3 weeks
Last seen: 3 days

0 1 * * * /home/pi/apps/.wg++/run.net.sh > /home/pi/apps/.wg+/wg.log 2>&1
But i changed the time

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 50 min

is there a wg.log file in your /home/pi/apps/.wg+ directory?
if not the cron didnt run.
as i said u may need to use root..
0 1 * * * root /home/pi/apps/.wg++/run.net.sh > /home/pi/apps/.wg+/wg.log 2>&1

now this may present problems depending h0ow u installed dotnet
if u didnt install it as root then its path wont be added to bashrc or wherever and it cant find it.
why i always use full paths,do you know where dotnet is installed?
use the full path to all,i have the dotnet binary in /opt/dotnet folder
0 1 * * * /opt/dotnet/dotnet /home/pi/apps/.wg++/bin.net/WebGrab+Plus.dll /home/pi/apps/.wg++ > /home/pi/apps/.wg+/wg.log 2>&1

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl