Re: cronjob in user environment
On Tue, 2008-09-02 at 14:18 +0200, Steve S wrote:
> Hi all,
>
> I want to run a cronjob in a user's environment (i.e. as this user and
> not as root).
>
> The script foo.sh to be run by cron on behalf of the a user (johndoe)
> needs some env vars (paths) from that user's ~/.bashrc.
why not, as johndoe, run `crontab -e` and add an entry such as
29 13 2 9 * . ${HOME}/.bashrc; ./foo.sh
works for me, as does this sort of thing:
03 00 1 * * USER=michael bin/backup-rsync-HORACE full
Reply to: