Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do cron jobs run non-interactive, non-login shells? [closed]

Tags:

shell

cron

init

Say I create a cron job that runs a Zsh or Bash script as /path/to/shell_script.sh

Would such a shell be a non-interactive non-login shell? If so, what shell init files would be executed (for Bash & Zsh)?

like image 241
Amelio Vazquez-Reina Avatar asked Nov 10 '22 08:11

Amelio Vazquez-Reina


1 Answers

zsh sources .zshenv (source).

bash sources $BASH_ENV if set. (source)

like image 104
that other guy Avatar answered Dec 03 '22 22:12

that other guy