[GRASS-user] Run grass console from a cronjob

Andrea Peri aperi2007 at gmail.com
Wed Aug 26 13:12:39 PDT 2015


I found the solution with the printenv.

My script was for bash-shell, but the crontab instead start a sh-shell.

Thx for help you and other grass guys.

A.


2015-08-26 22:09 GMT+02:00 Andrea Peri <aperi2007 at gmail.com>:
> <sorry the emaiil start before end the message>
>
> I would thx for your help you and the other grass guys.
>
> A.
>
>
> 2015-08-26 18:03 GMT+02:00 Nick Jachowski <njachowski at gmail.com>:
>> I've had this problem from cron before and a solution I've found is to print
>> all the environment variables using the linux command "printenv".
>>
>> Run printenv from your console and from the cron then compare the output and
>> see what's different.
>>
>> Then when you find the critical differences set those variables from the
>> head of your bash script you use on the cron.
>>
>> sample output from printenv:
>> ----------------------------------------------------------------------------------------
>>
>> vm=ubuntu.local
>>
>> AUTOJUMP_HOME=/Users/nick
>>
>> PYTHONPATH=/Users/nick/anaconda/lib/python2.7/site-packages/:/usr/local/lib/python2.7/site-packages/:
>>
>> LOGNAME=nick
>>
>> GEM_PATH=/Users/nick/.rvm/gems/ruby-2.1.1:/Users/nick/.rvm/gems/ruby-2.1.1 at global
>>
>> LC_CTYPE=UTF-8
>>
>> GOPATH=/Users/nick/Copy/libs/gocode
>>
>> ARCHFLAGS=-arch x86_64
>>
>>
>> On Wed, Aug 26, 2015 at 10:27 PM, Andrea Peri <aperi2007 at gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I'm try to run a grass session from a cronjob
>>> The cron execut a bash script where I try to execute
>>>
>>> grass70 -text -c /path-to-geotiff/file.tif -e /grassdata/mapset_location
>>>
>>> If I try the bash script from a console it run good and without any
>>> problem.
>>> Bu if I try to execute the script from a crontab.
>>> It stop to execute when try to do:
>>>
>>> grass70 -text -c /path-to-geotiff/file.tif -e /grassdata/mapset_location
>>>
>>> Is the grass suitable for a cronjob ?
>>>
>>> Thx,
>>>
>>> --
>>> -----------------
>>> Andrea Peri
>>> . . . . . . . . .
>>> qwerty àèìòù
>>> -----------------
>>> _______________________________________________
>>> grass-user mailing list
>>> grass-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>>
>
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------



-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------


More information about the grass-user mailing list