in reply to Data check or sleep
Note that you don't need to sleep *only* if $count == 0 - if you perform the copy, presumably you're not going to want to bother checking again for another 15 minutes.my $dbh = DBI->connect($connection_string); my $dbh2 = DBI->connect($connection_string2); while (1) { my $count = get_table_count($dbh); do_table_copy($dbh,$dbh2) if $count; sleep(15 * 60); }
Cheers, Ben.
|
|---|