I have a mySQL database using a PHP front end that is used as a call logging system. Clients call their clients and the results of those conversations are logged into the database. Periodically they would like to send emails to the management containing the information within the call logs. I can extract this information from the database and email it perfectly. How would I go about automating it? Is a cron job the only option? If so... how would I go about doing that? If not, what are my options?

K

    Hmmm, to do it from cron, install PHP as a system binary, and transfer your code to a "shell" type script written in PHP:

    #!/usr/local/bin/php
    
    MyPHPScript();
    
    //or whatever code you have to do this task...

    I have also seen folks suggest having a script trigger a certain action each time (or the first time) that it is loaded each day. That's kind of an interesting thought, but you'd have some guesswork in there, I guess:

    BOSS: When will the logs come in?
    YOU: Whenever, sir.......

      or you can create a php page and have the cron job call that page and run it, you have to use the lynx browser to do this however. do a search for cron job with php page at yahoo.com, there will be some tut's to help you out

        Doh! Lynx! Of course!

        Stolzyboy, thanks for reminding me of that...I may well need to do it in a project soon....

          Write a Reply...