$ crontab -l
#
# m h dom mon dow command
SHELL=/bin/bash
* * * * * (/usr/bin/curl -s -XPOST http://internal.ip -H 'Content-type: application/json' -d 'data')
$ ls -l /usr/bin/curl
-rwxr-xr-x 1 root root 123336 Jan 29 2012 /usr/bin/curl
$ uname -a
Linux machine 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64 GNU/Linux
$ cat /etc/debian_version
6.0.4
But the command doesn't get executed, and I see the following in /var/log/syslog:
Nov 29 20:29:01 machine /USR/SBIN/CRON[28580]: (CRON) error (grandchild #28582 failed with exit status 1)
The exact same command, when run directly from terminal, works fine:
$ (/usr/bin/curl -s -XPOST http://internal.ip -H 'Content-type: application/json' -d 'data')
{}
I tried googling, but all I could find was that the command path must work (it does, I set an absolute path) and that there must be a new line at the end of crontab (there is). Any ideas?
{}button. It will indent everything for you. – Shauna Nov 29 '12 at 19:47