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 <[email protected]>: > <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 <[email protected]>: >> 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@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 <[email protected]> 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 >>> [email protected] >>> http://lists.osgeo.org/mailman/listinfo/grass-user >> >> > > > > -- > ----------------- > Andrea Peri > . . . . . . . . . > qwerty àèìòù > ----------------- -- ----------------- Andrea Peri . . . . . . . . . qwerty àèìòù ----------------- _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
