Results 1 to 3 of 3
  1. #1

    Cron for a mysql command .

    Hello
    I have this command line

    UPDATE ibmembers SET mbox_listen=0

    ibmembers is table of thanhno_forum database , and i need to run this command line every day at 1AM . Could you tell me how to run it in cron tab ? I can make a cron in cpanel or cron file at root as well .
    Thank you

  2. #2
    script:
    Code:
    #!/bin/sh
    mysql --user=<user> --password=<password> -h <host> <<!! 
    use thanhno_forum;
    UPDATE ibmembers SET mbox_listen=0;
    quit
    !!

  3. #3
    Join Date
    Oct 2003
    Location
    Hanoi
    Posts
    4,306
    or create a php file contains your command. Then put it in cron, "Command to run:" using path like /home/user/.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •