Hi,
I am trying to run a script using crontab but for some reason its not working in crontab, but it works if I execute it manually.
The Script runs under user sysinfo and does the following:
a) runs a script called cfg2html as root (using sudo).
b) renames the output file.
c) copies the file to another server
d) then removes the file on the host server.
Script Contents:
* The keys have been exchanged between the two servers. In short, no password is required to log into the other system.
* The file, when run manually, gives the desired output
* The crontab entry is made in user sysinfo's crontab
* The crontab log file shows that the script was run at the intended time
The cfg2html script runs, since I have the ouput file genereated in the folder, but the files are not renamed nor scp to the other server and removed from the host server.
Oh yes the server is a SPARC running Solaris 10 (no Linux)
Any Suggestions
Thanks
I am trying to run a script using crontab but for some reason its not working in crontab, but it works if I execute it manually.
The Script runs under user sysinfo and does the following:
a) runs a script called cfg2html as root (using sudo).
b) renames the output file.
c) copies the file to another server
d) then removes the file on the host server.
Script Contents:
sudo /export/home/sysinfo/cfg2html-1.6.4/cfg2html
mv /export/home/sysinfo/cfg2html-1.6.4/`uname -n`_cfg.html /export/home/sysinfo/cfg2html-1.6.4/`uname -n`_`date +%d-%m-%y`.html
scp /export/home/sysinfo/cfg2html-1.6.4/`uname -n`*.html sysinfo@admincon:/export/home/sysinfo/systemInfo/
rm -rf /export/home/sysinfo/cfg2html-1.6.4/`uname -n`*.*
* The keys have been exchanged between the two servers. In short, no password is required to log into the other system.
* The file, when run manually, gives the desired output
* The crontab entry is made in user sysinfo's crontab
* The crontab log file shows that the script was run at the intended time
The cfg2html script runs, since I have the ouput file genereated in the folder, but the files are not renamed nor scp to the other server and removed from the host server.
Oh yes the server is a SPARC running Solaris 10 (no Linux)
Any Suggestions
Thanks