true has asked for the wisdom of the Perl Monks concerning the following question:
My goal is to have perl run povray every hour on my remote linux server and render a live 3d image of the server. With buildings for folder structures, and lights for log filed activity in certain folders, etc. A fun dabble in 3d with perl outputting dynamic povray code.
After installing povray, i set myself up a perl script to run the program, everything is great. Perl starts povray no problem and prints out povray's output as it should. I am running my perl script via a remote ssh window ala Putty.
This code below works as expected via a remote ssh window: I just type perl render.pl
#!/usr/bin/perl -w #render.pl use strict; #Cwd and chdir for cron friendly run use Cwd; print chdir("/homepath/3d/")."\n"; print getcwd()."\n"; print "Rendering Gigtown\n"; print system("povray ./gigtown.pov +W600 +H300"); exit;
Now the hourly part. I edit my crontab. adding perl render.pl to the list. Waiting patiently. Cron runs. My cron log file shows the povray command, but with NO parameters, nada zippo zilch.
More precisely, PovRay seems to not be accepting my parameter input unless i run it by hand via ssh.
To me this whole thing sounds like a silly oversight. And could still be. I also tried making a bash script to do the same thing. The bash run is reporting a segmentation fault which is waaay off topic. I have done everything but recompile povray from source (i don't know how to uninstall it first :))
Anybody know a work around for faking an ssh session via perl??
thanks for reading,
James
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Running Linux PovRay, Shell's okay but cron won't play
by Plankton (Vicar) on May 21, 2004 at 22:15 UTC | |
by true (Pilgrim) on May 21, 2004 at 23:01 UTC | |
by true (Pilgrim) on May 22, 2004 at 11:26 UTC |