I am currently trying to schedule a cronjob to run a .sh script file every minute.
This is my simple script:
#!/bin/sh
echo "Hello World" >> /Users/navania/crontab-scrip.log
I saved this on my Desktop and named it notify.sh. I then opened a new terminal window and entered crontab-e. This opened a new nano file where I typed:
* * * * * /Users/navania/Desktop/notify.sh
I saved and existed this nano file. What should I do next so that the cronjob successfully runs?
Steps so far:
- Open up terminal application and type in
crontab-e. - This opens up a new nano file where I type the command:
* * * * * /Users/navania/Desktop/notify.sh - I then hit control o to save it and then control x to save it under the name of CrontabTest.
- When I exit, it says that no changes made to crontab, which doesn't make sense.
- I then opened up the logfile, and see if it prints Hello World every minute which it doesn't.
Any help would be appreciated. Thanks!