[vox-tech] cron and user environment

Jeff Newmiller vox-tech@lists.lugod.org
Tue, 2 Sep 2003 09:48:44 -0700 (PDT)


On Mon, 1 Sep 2003, Jay Strauss wrote:

> How can I setup my environment from a cron job?  
> 
> I tried:
> 
> * * * * * . ~/.bash_profile; env > ~/env.out
> 
> but the second command doesn't run.
> 
> Currently to workaround I schedule the job from root and do:
> su - <username> -c ~/bin/thing
> 
> but don't really want to have to schedule stuff as root.

Do you have a blank line after your crontab entry?

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------