crontab to add default gateway
hi!
i need help on crontab adding default gateway i have mad my own crontab to check default gateway every 10 mins. but it did not work my codes: [mad@localhost ~]$ ls -la gateway -rwxr-x--x 1 mad mad 35 Dec 1 15:17 gateway Quote:
Quote:
thank you in advanced |
what happens when you run this from the command line?
If you are using bash try changing the file to: Code:
#!/bin/bash Code:
0 * * * * /home/mad/gateway >/tmp/output 2>&1 I am assuming that the user for the crontab is the same user that you tested the script. |
cron has a minimal default env, specifically the PATH variable.
Always specify the entire/absolute path to any prg or data file if called from within the cron env. eg /sbin/route |
Why would you need to update your default route or gateway that often? It shouldn't change at all unless you have another process changing it which seems sort of odd.
|
All times are GMT -5. The time now is 08:07 PM. |