Ugarit Ebla on 24 Aug 2008 14:24:11 -0700 |
cronjobs are run with a different user so there may be a permissions issue. Your script doesn't cd to a directory. You should do that. What's root in front of the script? Casey Bralla wrote: > I've got a small batch program that creates a nifty near-realtime view of the > earth with animated cloud cover (http://www.nerdworld.org/nerdspace.html) > that **used** to work, but now doesn't on my Debian 4 server. > > I can run the program just fine from a command prompt, but it fails in a very > strange way when run from crontab. > > The program has to do some image manipulations, and to do so it > calls "jpegtopnm" (part of "netpbm") to convert some jpg files into pnm > format. > > Oddly, I can run the conversion script from a bash shell prompt without any > trouble, but the program bombs weirdly if run from crontab. When it bombs, > it doesn't halt or give any kind of error message; but jpegtopnm just > creates a pnm file of zero length. > > > So, to summarize: > > When jpegtopbm runs in a script started from command prompt, it runs fine. > But when it runs in the same script started by crontab, it bombs silently > without creating the pnm image file. > > > > > > Here's an abbreviated version of the script file: > > #!/bin/bash > > # Create globe images with xplanet. Create xplanet00.jpg > /usr/bin/xplanet -body earth -num_times 1 -verbosity 1 -config > xplanet00.cfg -latitude 39.81 -longitude -75.90 -geometry 1003x752 -starfreq > 0 -projection orthographic -output xplanet00.jpg > > # Convert to intermediate format "pnm" > /usr/bin/jpegtopnm -verbose xplanet00.jpg > xplanet00.pnm > # (This is the line that does not work in batch mode) > > > > > > > The crontab line looks very normal: > 0,15,30,45 * * * * root /path/create.xplanet.images > > > > > > Anybody have any suggestions of where to explore troubleshooting this problem? > > All my error logs are clean. Nothing looks amiss, except that it doesn't > work. <sigh> > > > ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|