crontab issue
hi,
I wrote a small simple script which writes the arp table of the machine and transfer it to a tftp server the script is running great when i run it manually but when i try to run it via crontab i get an epmty file the empty file created on the local machine here is the script: arp -a > arp_table.txt tftp x.x.x.x -c put arp_table.txt |
Hi,
does the script work as expect when you run it manually? Problems with scripts not executing as you expect with cron are often caused by the limited environment. Eg the PATH is set differently. Did you check for error messages from cron? Eg in /var/log/syslog (exact location depends on your system, which you did not describe). Evo2. |
you ought to use full path in your script, something like:
/sbin/arp /usr/bin/tftp |
post the script in code blocks, but odds are you are not using the full path for the commands.
|
Provide the full paths to all of the binaries used in your script. This is likely causing you grief. One easy way to tell what's going on is to redirect stdout and stderr to a log file. This will show you the errors.
|
All times are GMT -5. The time now is 01:00 PM. |