Quote:
Originally Posted by xtremebass
Thanks for reply.
i have attached sample file what i have used for crontab scheduling.
file -1 :(sysinfo.sh)
results of following command output is shown after crontab scheduling
<code>
echo `hostname`
echo `hostname -i`
</code>
File -2 :
Scheduling file cronfile.sh
<code>
* * * * * bash /home/project/sysinfo.sh
</code>
when i gave wall(command) " some comments" in sysinfo.sh file alone, it works, but i gave other that like echo or shell script it wont show any result in command prompt or output, i have also checked /var/log/cron file it shows the error like this
Jan 29 10:22:59 system1 CROND[6521]: (root) CMD (bash /home/project/sysinfo.sh)
Jan 29 10:22:59 system1 CROND[6521]: LAuS error - do_command.c:226 - laus_attach: (19) laus_attach: No such device
can u suggest something about this problem.
when you use echo, I suggest to redirect the output to some file...
echo "hi" &> /home/ash/a.txt
see what it gives inside a.txt...
The reason is cron runs in backgroud...I think it is not attached with any tty console...Or may be puts stdout in some other file..
For safe side we always redirect output of scripts to our files..
PS: Don't forget to restart cron service....
Regards,
Ash