On Wed, Nov 9, 2011 at 7:45 AM, Greg Wooledge <wool...@eeg.ccf.org> wrote: > On Tue, Nov 08, 2011 at 09:46:37PM -0600, Peng Yu wrote: >> I need to use cron to run some job. I know that cron only set up very >> basic environment. I'd like to duplicate my login environment. > > Just source /etc/profile and your ~/.bash_profile or ~/.profile (or > whatever) from the script that your cron job executes. > > Personally I would advise against this. Login environments are for > interactive logins, not cron jobs.
So neither -i nor -l is necessary? -- Regards, Peng