[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Far girare uno script ogni 10 sec



> > Beh, puoi schedulare un job ogni minuto che esegua 6 volte il tuo script.
> Ok, e' una idea... ma come si fa ?

a schedularlo ogni minuto o a scrivere lo script?

per il primo caso

* * * * * /path/to/the/script

dentro crontab. Per il secondo punto, consideranto il tempo di
esecuzione medio dello script pari a "t" (t<10, ovviamente...)

#!/bin/bash

/path/to/the/script
sleep 10-t
/path/to/the/script
sleep 10-t
/path/to/the/script
sleep 10-t
/path/to/the/script
sleep 10-t
/path/to/the/script
sleep 10-t
/path/to/the/script

La curiosita' per che diavolo sia aumenta...

Ciao
-- 
Sandro Tosi (aka Morpheus, matrixhasu)
My (little) site: http://matrixhasu.altervista.org/index.html



Reply to: