I'm running Ubuntu 14 and I added the following line to my crontab:
*/1 * * * * : testing; /usr/sbin/service my-service status > ~/status 2>&1
After the next minute rolls around, I see this in ~/status:
my-service: unrecognized service
If I run this from the terminal, it does recognize the service:
~$ /usr/sbin/service my-service status
my-service stop/waiting
I'm wondering what could be responsible for my service being unrecognized in the cron job's environment but not in my environment when I ssh to the server?