I've been discvering some long lasting linux techs to help automate my daily work. I found cron to be very powerful if I can use it to check the updates of some packages I have on my system.
For example, I want to update my Homebrew everyday at 11pm. What I did is, with sudo crontab -u user -e, I opened up crontab in Vim. And I put following commands into it, to make updates for homebrew and send me an email.
Here's the code:
MAILTO=myemail@foo.com
* 23 * * * brew update
and I save it to wait for magic happens. Instead of excuting this command, in the email I recieved, it says /bin/sh: brew : command not found
But when I type /bin/sh in terminal to open sh and type in brew update it will update the Homebrewć
What did I do wrong with my crontab configuration?
Any help will be appreciated!
