I Was Wrong

Sarah Reichelt sarah.reichelt at gmail.com
Wed Dec 28 16:40:00 EST 2005


> Here's an example I use to set up a cron at 2:00am every morning to backup a
> mySQL database called "mydb". Basically you create a crontab file and then
> call "crontab" on it (watch for line wraps):
>
>   put "~/mydbcron" into tCronFile
>   numToChar(10) into tCronData
>   put format("0\t2\t*\t*\t*\t") & \
>     "/usr/local/mysql/bin/mysqldump -u root mydb > ~/Documents/mydbsql" & \
>     numToChar(10) into tCronData
>   put tCronData into url("binfile:" & tCronFile)
>   get shell("crontab ~/mydbcron")
>   if it <> "" then
>     answer error it titled "Cron Status"
>   else
>     answer "Backup has been set for 2:00 AM every day." titled "Cron Status"
>   end if
>   delete file tCronFile
>
> Hope this helps,

It certainly does - this was exactly the sort of info I was looking for.

Thanks Ken.

Sarah



More information about the use-livecode mailing list