I am learning how to use crontab and in that pursuit what I wanted to do was print something simple in the shell. So I did crontab -e
and typed the following
* * * * * bash /etc/test.sh
test.sh
echo $NODE_ENV
Now what I expect is the cronjob to print the value of NODE_ENV
every one minute to the shell, which it doesn't. Why doesn't it print that? Should it not print, or am I doing something wrong?
Some things that I have already tried.
$ ps aux | grep crond
ubuntu 15438 0.0 0.0 11284 936 pts/1 S+ 09:37 0:00 grep --color=auto crond
/var/log
does not have a cron.log file create so no logging of if my job has actually run.
I am running this command in Amazon EC2 instance in ubuntu 16.04, any more output you need please let me know.