mtr
Hi
i have a script to run a couple of commands but it doesnt run mtr from the cron jon when i run the script manualy it works but when its in the cron it doesnt here is the command mtr -n -p -c 2 192.168.2.1 >> /file/ has anyone had this same problem and can anyone help |
As a general rule, you have to use the full path of the commands inside a cron job, since the crontab has a very limited environment and the PATH variable is usually limited to /bin:/usr/bin. Put the full path to mtr and it should work from the crontab as well.
|
Hi
Thanks for that its works but it keeps running even with the option for only 1 count /usr/sbin/mtr -r -n -p -c 1 192.168.2.2 |
Quote:
-i is the interval in seconds, between ICMP requests. 1 second is the default. |
Could it have something to do with cron job iterations? The -c 1 option runs the command a single time.
|
All times are GMT -5. The time now is 12:38 PM. |