Al momento, stai seguendo questo contributo
- Vedrai gli aggiornamenti nel tuo feed del contenuto seguito
- Potresti ricevere delle email a seconda delle tue preferenze per le comunicazioni
Tired of having scripts you leave running overnight fail because of intermittent network / filesystem errors? Me too. So I wrote try_repeatedly(). Think of it as a more "determined" version of try. It doesn't give up the first time the code inside throws an error, but attempts to run the code again, after a pause, up to 16 times before giving up.
EXAMPLE
Assuming you had a function in unreliable_processing.m that
takes a single input and has a single output that occassionally
throws an error due to intermittent network issues:
x = 5;
try_repeatedly( 'y = unreliable_processing( x )' );
z = y+1;
save results z
Cita come
Clark Williams (2026). try_repeatedly.m (https://it.mathworks.com/matlabcentral/fileexchange/47270-try_repeatedly-m), MATLAB Central File Exchange. Recuperato .
Informazioni generali
- Versione 1.0.0.0 (1,22 KB)
Compatibilità della release di MATLAB
- Compatibile con qualsiasi release
Compatibilità della piattaforma
- Windows
- macOS
- Linux
| Versione | Pubblicato | Note della release | Action |
|---|---|---|---|
| 1.0.0.0 |
