First- I've already scoured this page and nothing has worked.
My script will create a file, this is how I know if it has run or not. /var/log/syslog
isn't giving me any debugging information. Below is my crontab section, below what's already there by default:
SHELL=/bin/bash
# Check for minecraft server updates
* * * * * root minecraft_update > /tmp/cron.out
# TEST
* * * * * root env > /tmp/env.out
Note: there is a blank line at the end of the crontab file. I specified the bash shell even though that is specified in my script. My script (minecraft_update
) lives in the /usr/local/bin
directory, and the only other commands it calls are grep
, ls
, and head
, which are all in the /bin
dir, which is already defined in the crontab PATH.
The /tmp/cron.out
file is created, but empty. The /tmp/env.out
file is created and confirms that the PATH includes both the /usr/local/bin
and /bin
dirs, and also confirms the SHELL=/bin/bash
.
Addtl. perms info:
ll /etc/crontab
-rw-r--r-- 1 root root 998 Jul 1 12:47 /etc/crontab
ll /usr/local/bin/minecraft_update
-rwxr--r-- 1 root root 1132 Jul 1 12:31 minecraft_update*
I'm so frustrated with this! Please bring an end to my * * * * * misery... [That's cron notation, not profanity btw. Gotta love Linux humor :)]
minecraft_update > /tmp/cron.out 2>&1
) - that might give you some indication of what's failing/etc/crontab
directly, or are you usingsudo crontab -e
? (Which uses a different file)