in reply to automating a task
If I were writing that, I would allow for the database going off-line while the program sleeps.
This is important if you are doing maintenance work. $dbh may no longer be valid when you wake up. I would put some code to try to re-connect (with sleep/retry) if the current connection is invalid.
I would also add some escape route - reporting the catastrophe, in case of "repeated failure" for an "extended period", for some definition of those terms.
Potentia vobiscum ! (Si hoc legere scis nimium eruditionis habes)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: automating a task
by Anonymous Monk on May 31, 2009 at 20:59 UTC | |
by ww (Archbishop) on May 31, 2009 at 21:47 UTC |