My beloved monks, blessed are the ignorant for they shall inherit the answer. Been playing with PovRay, a kickingly cool open source 3d renderer. http://povray.org

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

jtrue

In reply to Running Linux PovRay, Shell's okay but cron won't play by true

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.