What we have here is a failure to communicate. A. Here's your scheduling: http://www.remote-cron.com/
B. Here's your Backup AND email: http://www.dagondesign.com/articles/automatic-mysql-backup-script/ You use A to launch B. And be done with it. What's so hard about that? There is no coding or *implementation* involved here. -- Baz L Web Development 2.0: Web Design, CakePHP, Javascript http://www.WebDevelopment2.com/ On Nov 13, 2007 7:51 PM, technicaltitch <[EMAIL PROTECTED]> wrote: > > You are absolutely right - this is a better solution than mine - > thanks very much Baz! > > It does require learning how to send attachments (not very well > supported within native PHP) and doesn't provide scheduling though, so > rather than integrate two new modules I've stuck with my substandard > approach. If I were doing this from scratch I'd use Baz's > recommendations. > > Thanks hugely for everyone's great help and inspiration > Chris > > (PS. The call isnt asynchronous - the redirect happens only once the > backup has finished.) > > (To implement scheduling I've done: > > $ret = $this->Article->query("SELECT 1 AS BackupRequired FROM > last_backup WHERE DATEDIFF(CURDATE(), date) > 180"); > if ($ret) { > // DO BACKUP > ............. > $this->Article->execute("UPDATE last_backup SET date = > CURDATE()"); > } > > (table script: > CREATE TABLE last_backup ( > date datetime NULL > ) ENGINE = MYISAM ; > INSERT INTO last_backup (date) VALUES (CURDATE()); > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---