On Tue, 5 Jul 2022 09:52:24 +0200, zeneca wrote:
I wrote a program run every 5 minutes from a bash script.
It run ok, but when I reboot it doesn't start giving :
-bash: ./nokia: Fichier texte occupé ( text file occupied )
??
I can't run it manually, same error.
to solve this I have to recompile no changes in source code ( C)
any idea ?
Many thanks
How is the wait handled? If you're running something like
stop = 0
while (stop)
do
nokia
sleep 5m
done
consider rewriting it as a cron script instead As an example, my internet connection is slow often enough that I check its speed every 10 minutes
with this cron script in /etc/cron.d
#
# Run at 15 minute intervals
# ==========================
# Results are sent to root
#
MAILTO=root
2,17,32,47 0-23 * * * root /usr/local/bin/adslchk -b 2>&1 >>/var/log/
adslchk
This cron script runs the "/usr/local/bin/adslchk -b 2>&1 >>/var/log/
adslchk" command at 2,17,32,47 minutes after each hour and writes the
script output to /var/log/adslchk.
The advantages of this approach are that:
- the process is automatically started when the computer is rebooted
- the adslchk script only runs for a few seconds each time its started
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)