Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh in cron



Thanks Bart, it worked like a charm.

BTW, what +Z options means? And what is ZLE, how to turn it off?

Would you know the equivalent with bash?

Many thanks,
Alan

On Thu, Feb 12, 2009 at 15:47, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
On Feb 12,  9:46am, Alan wrote:
}
} I am trying to get the whole env variables that I get when I am logged in
} but via cron:
}
} I doing this with crontab -e:
}
} * * * * *  zsh -lc "env" >& $HOME/out

I'm not sure why you want to to this, but try adding the -i option and
just for safety turn off ZLE:

* * * * *  zsh -ilc +Z "env" >& $HOME/out

This will force zsh to be an interactive shell and read more of the
startup files.  The -c option will still cause the shell to run only
the one command.  However, it may try to do terminal setup, so expect
some error output.



--
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
>>http://www.bio.cam.ac.uk/~awd28<<


Messages sorted by: Reverse Date, Date, Thread, Author