I've got an *extremely* simple script I want to run every minute:
Code:
#!/bin/sh
ping -c 1 192.168.1.20 > ~/onlinestatus.txt
So, the script is called "status", it's executable, and in the correct path, etc. In a terminal window (I'm using Mac OS X), I can type status, and it will create onlinestatus.txt with the ping output in it. Everything seems to be working fine.
HOWEVER, when I put the command in my crontab as
* * * * * status
It doesn't work. Or, to be more precise, it creates an *empty* onlinestatus.txt file. I can use Cronnix (a GUI crontab editor) to force the command to run. When I do that, onlinestatus.txt *does* contain the ping output; it seems like it's only when cron runs it at the scheduled interval that the text file comes out empty.
I'm *thoroughly* confused.

If it didn't work *at all*, I could deal with it, but this behavior doesn't seem to make any sense. Any suggestions?