I have created an /etc/crontab file on a Mac OS X that runs a few simple commands. I would like to use the crontab to echo a statement in my terminal, logout from the OS (as if I was to point my mouse to the command Logout), and I am trying to test it by running an echo statement every two minutes. Here is what I have so far:
55 12 * * * echo "Don't forget to log out!! Will be automatically logging out at 12PM Sharpe!!"
* 13 * * * logout
1 * * * * echo "Test"
At that point, I used crontab /etc/crontab
to ensure that my user points to the crontab file (which it does) and was able to confirm it by typing crontab -l
.. What will i need to do in order to make it so that it echoes in my terminal and have it actually Log out of the operating system at 12 Noon everyday?
cron
is the answer? – DopeGhoti Nov 30 '15 at 18:43cron
s environment, as they are handled by the login shell (usuallybash
). – DopeGhoti Nov 30 '15 at 18:50