You are here

cronjob script start WebGrab raspberry pi

13 posts / 0 new
Last post
WaiWaiH
Offline
Joined: 8 years
Last seen: 7 years
cronjob script start WebGrab raspberry pi

Hi ,

Can Webgrab be scheduled to run on raspberry pi via crontab ?

i tried to script first:

-------------------------------------------------------------------------------------------------------------
#!/bin/bash
# WebGrab

cd /home/pi/wg++
/usr/bin/mono WebGrab+Plus.exe  "$(pwd)"
-------------------------------------------------------------------------------------------------------------

result is that it don't get the config file

-------------------------------------------------------------------------------------------------------------
/ doesn't exist!
correct the commandline parameter to match an existing path!
Excecution will stop!
pi@raspberrypi ~ $
-------------------------------------------------------------------------------------------------------------
 

How can i correct this ?
Thanks in advance.

kind regards,

 

WaiH
 

 

 

 

 

 

 

 

 

francis
Offline
francis's picture
Has donated long time agoWG++ Team member
Joined: 11 years
Last seen: 1 month
Is the support helpful?
support us

can you run it manually?

And what is the exact logfile?

WaiWaiH
Offline
Joined: 8 years
Last seen: 7 years

i can run it manually with

cd wg++/
mano WebGrab+Plus.exe "$(pwd)"

the only log is the log when it started manually (included)

but somehow it doesn't work when i use it in a .sh script.

 

 

 

Attachments: 
francis
Offline
francis's picture
Has donated long time agoWG++ Team member
Joined: 11 years
Last seen: 1 month
Is the support helpful?
support us

And can you run the .sh manualy?

You could try to change the .sh to:

cd /home/pi/wg++
/usr/bin/mono WebGrab+Plus.exe  "/home/pi/wg++"
WaiWaiH
Offline
Joined: 8 years
Last seen: 7 years

sorry,  manually i mean type it in shell

tried manually the .sh script and get those errors.tried

cd /home/pi/wg++
/usr/bin/mono WebGrab+Plus.exe  "/home/pi/wg++"

also get the same error

 

/ doesn't exist!
correct the commandline parameter to match an existing path!
Excecution will stop!

francis
Offline
francis's picture
Has donated long time agoWG++ Team member
Joined: 11 years
Last seen: 1 month
Is the support helpful?
support us

And without the quotes?

WaiWaiH
Offline
Joined: 8 years
Last seen: 7 years

tried it, still the same error, tried different variations

cd /home/pi/wg++
/usr/bin/mono WebGrab+Plus.exe  /home/pi/wg++/

with

cd /home/pi/wg++
/usr/bin/mono WebGrab+Plus.exe  "$(/home/pi/wg++/WebGrab++.config.xml)"

i get this

pi@raspberrypi ~ $ bash test.sh
/home/pi/wg++/WebGrab++.config.xml: line 1: !--?xml: No such file or directory
/home/pi/wg++/WebGrab++.config.xml: line 2: settings: No such file or directory
/home/pi/wg++/WebGrab++.config.xml: line 3: $'\r': command not found
/home/pi/wg++/WebGrab++.config.xml: line 4: !--: No such file or directory
/home/pi/wg++/WebGrab++.config.xml: line 5: $'\r': command not found
/home/pi/wg++/WebGrab++.config.xml: line 6: filename: No such file or directory
/home/pi/wg++/WebGrab++.config.xml: line 7: syntax error near unexpected token `<'
'home/pi/wg++/WebGrab++.config.xml: line 7: `  <mode></mode>
          WebGrab+Plus/w MDB & REX Postprocess -- version 1.1.1/55.27
                                Jan van Straaten
                             Francis De Paemeleere
            thanks to Paul Weterings and all the contributing users
--------------------------------------------------------------------------------
/ doesn't exist!
correct the commandline parameter to match an existing path!
Excecution will stop!
pi@raspberrypi ~ $

somehow it can't find the config file

----------------------------------------------------------------------------------------------------------------------------------------------------------------
with:

cd /home/pi/wg++
/usr/bin/mono WebGrab+Plus.exe  "/home/pi/wg++/WebGrab++.config.xml"

it gives:

/ doesn't exist!bGrab++.config.xml
correct the commandline parameter to match an existing path!
Excecution will stop!

----------------------------------------------------------------------------------------------------------------------------------------------------------------

without quotes:

cd /home/pi/wg++
/usr/bin/mono WebGrab+Plus.exe  /home/pi/wg++/WebGrab++.config.xml

/ doesn't exist!bGrab++.config.xml
correct the commandline parameter to match an existing path!
Excecution will stop!

 

francis
Offline
francis's picture
Has donated long time agoWG++ Team member
Joined: 11 years
Last seen: 1 month
Is the support helpful?
support us

No WebGrab++.config.xml after the path.

The parameter to wg++ must be a folder, not a file!

 

So

cd /home/pi/wg++
/usr/bin/mono WebGrab+Plus.exe  /home/pi/wg++

should work.

And in your first post, it worked, so that should be the way to do it.

Also, did you copy the text from windows to linux, or just retyped it in linux?
I know that this is sometimes mixing up things.

WaiWaiH
Offline
Joined: 8 years
Last seen: 7 years

i typed it all in linux.

still not working with /home/pi/wg++ OR  ./ or any other reference to a dir, it won't run  and gives

/ doesn't exist!
correct the commandline parameter to match an existing path!
Excecution will stop!

attached test.sh file

 

Attachments: 
WaiWaiH
Offline
Joined: 8 years
Last seen: 7 years

Is it possible for the linux version to set default to current dir ?
 

Roberto
Offline
Joined: 7 years
Last seen: 7 years

have you find a solution?

 

i have the same trouble, i want to execute wg++ in gnome schedule so i don't do it manually, but doesn't works.

 

seems that doesn't recognize files in wg++, so tell me that missing files in /home/pi, but wg++ is on /home/pi/wg++

WaiWaiH
Offline
Joined: 8 years
Last seen: 7 years

sorry no solution yet.

went back to windows for grab.

1NSdbZVbpZDX
Offline
Joined: 9 years
Last seen: 6 years

#!/bin/bash

cd $HOME/pi/wg++ && mono WebGrab+Plus.exe "$(pwd)"

should work, check if your system has bash update, use scheduler

terminal:

sudo apt-get install gnome-schedule
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