|
Blue Forest http://www.lslnet.com at 11:18 on June 26, 2006
Crontab problems Crontab problems
I wrote a shell script, in order firms under normal operation, the script is as follows :
#!/bin/bash
For i in 1 2 3
Do
Dir=/var/www/html/mrtg/xqw/$i
For conference in `ls $dir`
Do
Conf=$dir/$conf/mrtg$conf.cfg
/usr/bin/mrtg $conf
Done
Done
Purpose is to generate new switchboard operation mrtg flow graph record. But China wrote crontab-e
* * * * /home/tomduanj/shell/mrtg */5
: : /etc/mrtg/xqw/xqwmrtg Being given /etc/mrtg/xqw/xqwmrtg can not execute binary file :
The script is how I might binary code? He is only a shell script ah |
Crontab problems -->
This is a script in two.
First, the internal loop China
For conference in `ls $dir`
...
Conf= xxxxxxx
...
Done
Conference this variable reuse, error-prone
2.
Under the crontab. We will not set an environment variable intact, in Call
Order catalog system is to write.
If 1s
Should be rewritten /bin/ls
This can be normal in crontab. |
Crontab problems * * * * /home/tomduanj/shell/mrtg */5
It would also add this :
* * * * /bin/bash /home/tomduanj/shell/mrtg */5 |
Crontab problems No use ah, to revise the script
#Purpose Every five minutes inquiries Area 3 : Outline all switches a record flow
#Author:tomduanj
#Date:2003.5.21
#!/bin/bash
While true
Do
For i in 1 2 3
Do
Dir=/var/www/html/mrtg/xqw/$i
For conference in `/bin/ls $dir`
Do
Mrtgconf=$dir/$conf/mrtg$conf.cfg
/usr/bin/mrtg $mrtgconf
Done
Done
Done
The same error or
/home/tomduanj/shell/mrtg : /etc/mrtg/xqw/xqwmrtg Can not execute binary file : |
Crontab problems While the above sentence is not implemented in crontab, I benzene, write a cycle of death and let him keep the implementation |
Crontab problems I do not know if it was my crontab, and you do not like the idea, if it is said that every five minutes, I set out time
* * * * Shellname 5,10,15,20,25,30,35,40,45,50,55,60
But all this shellname write path |
Crontab problems -->
If redhat said in the next five minutes can be used.
* * * * /path/to/prog */5 |
Crontab problems ? |
Crontab problems /home/tomduanj/shell/mrtg Your script :
Being given is : /etc/mrtg/xqw/xqwmrtg can not execute binary file :
Your question : how could my script is binary code? He is only a shell script ah
It does not say that your script is a binary code. |
Crontab problems The information is not being given : to implement binary file? |
Crontab problems My crontab, manual scripts can be implemented
& 1
Message 1 :
From Oracle Fri May 30 09:19:00 2003
Date : Fri, 30 May 2003 09:19:00 +0800
From : root@localhost.localdomain (chsion Daemon)
To : oracle@localhost.localdomain
Subject : chsion "oracle@dbback> * /home/oracle/backup.sh
X-Cron-Env : "SHELL=/bin/sh>
X-Cron-Env : "HOME=/home/oracle>
X-Cron-Env : "PATH=/usr/bin:/bin>
X-Cron-Env : "LOGNAME=oracle>
/bin/sh Makefile : command not found : |
| |