On Tue, 29 Jul 2003, Paul Archer wrote:

> 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
> 
This looks like it would do the trick.. However this cron job will be 
running on other os' then Linux.. 

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..


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to