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)
In reply to Re: automating a task
by NetWallah
in thread automating a task
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |