On 12/28/05 10:55 AM, "Dom" <[EMAIL PROTECTED]> wrote:

> Thomas McGrath III <[EMAIL PROTECTED]> wrote:
> 
>> Does any one know where these files live?
> 
> you would like to debut at:
> 
> http://www.afp548.com/article.php?story=20050103223643995
> 
> "One of the most essential, and misunderstood, server admin skills is
> being able to maintain a crontab file. The syntax of the crontab file
> though has been known to drive a sysadmin to drink."
> 
> ;-)

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,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to