Trying to add cronjob results in ""LICENSE":0: bad minute"
You can't add a crontab entry by just running crontab <entry details>
. In your case the shell expands the *
with whatever filenames it finds in the current directory (which seems to be a file called LICENSE
, replace crontab
by echo
to see what happened to the other *
's).
To add new entries to the crontab
file run
export EDITOR=nano
crontab -e
add the line
* * * * * /Users/username/Downloads/reddit-notifications-master/notifyer.sh
directly to the file and save it, then exit the editor again. You can verify that it got added by running crontab -l
.
Some additional things to consider:
- Run
chmod +x /Users/username/Downloads/reddit-notifications-master/notifyer.sh
to make sure the script is executable - Run
type python3
in your shell and use the full path you get withinnotifyer.sh
to avoid issues withpython3
not being inPATH
-
If
notifyer.sh
is only used to launch the Python script you don't need the script at all, you can just add* * * * * /path/to/python3 Users/yogesh/Downloads/reddit-notifications-master/reddit_notifications.py
to your Crontab instead.