[GRASS-user] Run grass console from a cronjob

Nick Jachowski njachowski at gmail.com
Wed Aug 26 09:03:58 PDT 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150827/f80e0ab4/attachment.html>


More information about the grass-user mailing list