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

Re: zsh in cron



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.



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