Yesterday, [EMAIL PROTECTED] wrote: > This may be a bit off topic, but I'll ask it.. > > 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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]