> > > I have a perl job I want to run out of a cron job, However cron is not > > > reading my .cshrc file by default. So what I have to do is "wrap" the perl > > > job in a tcsh shell and then run the shell file out of cron. > > > > > > Is there a better way? Or maybe the real question is should I be > > > "hardcoding" the var's out of my .cshrc file in my perl script? I think > > > this may be a bad thing to do, but isn't this what I'm doing in the .cshrc > > > file? > > > > > > > My personal trick if I need a complete environment for a cron job or startup > > script is to create an 'at' job that runs what I want, then find the file in > > /var/spool/atjobs (for Linux), and copy it where I need it. (Don't forget to > > remove the atjob, since you probably don't actually want it to run.) > > > > Since 'at' captures the complete environment, the file (script, actually) > > will have everything you need in it. > > > > Paul > > > This looks like it would do the trick.. However this cron job will be > running on other os' then Linux.. >
(Should work on pretty much any OS that has 'at' and 'cron'--you just have to find the directory that 'at' uses. > I ended up just dumping the commands into a sh script and having cron call > it. It's not the way I think it would run best, but It's probally less > work to do it this way in the long run.. > If you need any sort of an environment for a cron job, you just about have to run a shell script--although you *can* feed variables to a program with a little-known syntax: var1=value1 var2=value2 /file/or/script Paul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]