You are here

Timezone issue in Raspberry Raspbian

6 posts / 0 new
Last post
Roberto
Offline
Joined: 4 years
Last seen: 3 years
Timezone issue in Raspberry Raspbian

Hi everybody,

 

i have a problem in my raspbian ( raspberry ), when i execute it  with gnome schedule 2.1.1, because i want to automate it.

I put wg++ in /home/, so i have /home/wg++/

if i launch it i have:

pi@raspberrypi:~ $ sudo mono /home/pi/wg++/WebGrab+Plus.exe "$(pwd)"

          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
--------------------------------------------------------------------------------

my.movies.it.ini  doesn't exist !!
empty.ini assumed, will yield no results!

System.IO.FileNotFoundException: Could not find file "/home/pi/empty.ini".
File name: '/home/pi/empty.ini'
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess a                                                                                        ccess, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options                                                                                        ) [0x00000] in <filename unknown>:0
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess a                                                                                        ccess, FileShare share) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,Sys                                                                                        tem.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown                                                                                        >:0
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding enco                                                                                        ding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in <                                                                                        filename unknown>:0
  at System.IO.StreamReader..ctor (System.String path) [0x00000] in <filename un                                                                                        known>:0
  at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string)
  at System.IO.File.ReadAllText (System.String path) [0x00000] in <filename unkn                                                                                        own>:0
  at WGconsole.SiteIni..ctor (System.String ini_file) [0x00000] in <filename unk                                                                                        nown>:0
  at WGconsole.Config..ctor (System.String Path) [0x00000] in <filename unknown>                                                                                        :0

 

if i launch sudo mono ~/wg++/WebGrab+Plus.exe "$(pwd)"

same issue

how can i fix it?

 

because i need to automate it, so i can't make:

cd /home

cd /pi

cd wg++

sudo mono WebGrab+Plus.exe "$(pwd)"

 

if i do it works, but i do it manually and it's crazy ;)

 

 

Roberto
Offline
Joined: 4 years
Last seen: 3 years
Blackbear199 wrote:

first in you r /home directory you shouldnt need to use sudo,try without it.it should work the same.

i would create a sh file and run that with  gnome schedule

from what i see ur files are in /home/pi/wg++

so create a file in /home/pi/wg++ and call it webgrab.sh

open it and put this inside it

#!/bin/bash

cd /home/pi/wg++

mono WebGrab+Plus.exe "/home/pi/wg++"

exit

thats it.make the file executable..

sudo chmod 755 /home/wg++/webgrab.sh

schedule webgrab.sh to run whenever you want or you can also use crontab,google it.its easy to setup also.

if you want to test the script,...

cd /home/pi/wg++

./webgrab.sh

and webgrab should run,you can stop it with ctrl-c

 

 

 

 

thanks for that, works if i launched sh from terminal, but crontab ( gnome-schedule 2.1.1) seems that doesn't works.

Doesn't execute any command, i don't understand why, i tried to execute it with root user without success.

 

I have last raspbian.

Roberto
Offline
Joined: 4 years
Last seen: 3 years
Blackbear199 wrote:

whats your crontab entry?

are you entering it from terminal with crontab -e

example

00 20 * * * /home/pi/wg++/webgrab.sh > /home/pi/wg++/webgrab.log 2>&1

00 20 * * * <--------------------------------------everyday 20:00 hrs

/home/pi/wg++/webgrab.sh <---------------what to execute

> /home/pi/wg++/webgrab.log 2>&1<----creates a log file in wg++,not needed if you dont want a log.

crontab quick reference

*     *     *   *    *        command to be executed
-     -     -   -    -
|     |     |   |    |
|     |     |   |    +----- day of week (0 - 6) (Sunday=0)
|     |     |   +------- month (1 - 12)
|     |     +--------- day of        month (1 - 31)
|     +----------- hour (0 - 23)
+------------- min (0 - 59)

 

 

crontab -e return me:

0 2 * * 5 /home/pi/./webgrab.sh # JOB_ID_3

i tried to execute it in gui but seems that doesn't execute

Roberto
Offline
Joined: 4 years
Last seen: 3 years
Blackbear199 wrote:

look at my example

in the crontab setup you dont enter the ./webgrab.sh

just

/home/pi/wg++/webgrab.sh # JOB_ID_3

 

0 1 * * 4 /home/pi/wg++/webgrab.sh # JOB_ID_6

i do that, but i need to wait this night at 01:00 to verify if it works.

 

In GUI, the botton execute the task now, doesn't works. 

 

(is normal anyway that for 192 channels, and 5 days, need 8 hours ? )

Roberto
Offline
Joined: 4 years
Last seen: 3 years
Blackbear199 wrote:

just temporarly set it to something like this..

0 1 * * * /home/pi/wg++/webgrab.sh # JOB_ID_6

set 0 1 which is the minutes and hrs to a few minutes from now.

then in terminal enter this command

top

this will show all running processes,at about the time you set in your crontab look for webgrab.sh in the list.

press the q key to exit top.

 

 

0 1 * * 4 /home/pi/wg++/webgrab.sh # JOB_ID_6
* * * * * /home/pi/wg++/webgrab.sh # JOB_ID_7

 

so every mins should be start, but nothing, doesn't appear "mono" in top

but if i launch manually in shell ( terminal ) with:

/home/pi/wg++/webgrab.sh

i can see "mono" in top and execute it..... ;(

 

 

EDIT:

 

i found in /var/mail that:

 

From pi@raspberrypi Wed Jun 22 18:08:02 2016
Return-path: <pi@raspberrypi>
Envelope-to: pi@raspberrypi
Delivery-date: Wed, 22 Jun 2016 18:08:02 +0200
Received: from pi by raspberrypi with local (Exim 4.84_2)
        (envelope-from <pi@raspberrypi>)
        id 1bFkh7-0002mX-FH
        for pi@raspberrypi; Wed, 22 Jun 2016 18:08:01 +0200
From: root@raspberrypi (Cron Daemon)
To: pi@raspberrypi
Subject: Cron <pi@raspberrypi> /home/pi/wg++/webgrab.sh # JOB_ID_6
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/pi>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=pi>
Message-Id: <E1bFkh7-0002mX-FH@raspberrypi>
Date: Wed, 22 Jun 2016 18:08:01 +0200

/home/pi/wg++/webgrab.sh: riga 5: mono: comando non trovato

From pi@raspberrypi Wed Jun 22 18:09:02 2016
Return-path: <pi@raspberrypi>
Envelope-to: pi@raspberrypi
Delivery-date: Wed, 22 Jun 2016 18:09:02 +0200
Received: from pi by raspberrypi with local (Exim 4.84_2)
        (envelope-from <pi@raspberrypi>)
        id 1bFki5-0002pU-8G
        for pi@raspberrypi; Wed, 22 Jun 2016 18:09:01 +0200
From: root@raspberrypi (Cron Daemon)
To: pi@raspberrypi
Subject: Cron <pi@raspberrypi> /home/pi/wg++/webgrab.sh # JOB_ID_6
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/pi>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=pi>
Message-Id: <E1bFki5-0002pU-8G@raspberrypi>
Date: Wed, 22 Jun 2016 18:09:01 +0200

/home/pi/wg++/webgrab.sh: riga 5: mono: comando non trovato

last line says that in sh script, in line 5, mono is a nt found command

 

and now i tried one more time to add in line 5 "sudo" and not only mono, seems that works like that.

 

Roberto
Offline
Joined: 4 years
Last seen: 3 years

infact in /usr/bin there isn't any mono or symbolic mono link, nothing...

 

but from shell i can launch mono command:

pi@raspberrypi:~ $ mono
Usage is: mono [options] program [program-options]

Development:
    --aot[=<options>]      Compiles the assembly to native code
    --debug[=<options>]    Enable debugging support, use --help-debug for detail                                                                                        s
    --debugger-agent=options Enable the debugger agent
etc.... i don't paste all mono help

 

 

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