| PLEX86 | ||
|
crontab and scriptsHello. I try to execute following bash code thanks to crontab every minute in my computer. -------------------------------CUT HERE------------------------------ #!bin-bash mytime=`-sbin-clock bin-awk '{print $5}'` fcron and fcrondyn Im running the 2.6.14.5 Kernel using Trustix, and I noticed that none of roots cronjobs (like logrotate) were running. I restarted the fcron daemon, but didnt seem... if ! ping -c 1 google.com; then usr-sbin-pppd call ppp0 bin-touchhome-opexoc-make$mytime fi -------------------------------CUT HERE------------------------------ so I save this code inhome-opexoc-script and I execute "crontab -e" in my console to write: * * * * *bin-bashhome-opexoc-script This method generally works well. When my connection is failed, this script can connect linux to my internet provider every minute, but I see some small bug, which is connected with making file called make$mytime. It appears, that when I execute this script from console writing ".-script", this script works properly and created file is called for example "make17:04:56", but when it is being executed from crontab it looks that this file is called only "make". I can't understand where is a problem. Furthermore, I can't understand why I should add direct paths to the programs which are used in my scripts, while I am using crontab. It is not a rule, but I often have to do this. best regards, opexoc
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||