How to run a php script automatically daily?

34,702

Solution 1

Is it possible to write some service in XAMP server to run the script daily at scheduled time?

Create a Cron Job.

Solution 2

you should use cron job, it will run your script automatically

http://www.thegeekstuff.com/2011/07/php-cron-job/

Solution 3

Look into CRON Jobs: http://en.wikipedia.org/wiki/Cron They will allow you to schedule multiple scripts to run automatically, without your intervention on a determined schedule.

Share:
34,702
Pramod Gupta Bavirisetty
Author by

Pramod Gupta Bavirisetty

Updated on November 10, 2020

Comments

  • Pramod Gupta Bavirisetty
    Pramod Gupta Bavirisetty over 3 years

    Possible Duplicate:
    How to run a php script in cron

    I need to run a php script at the scheduled time daily to update some fields in database and to send automated email. How I can do this?

    Is it possible to write some service in XAMP server to run the script daily at scheduled time? I have no idea how to update database and send email automatically at the scheduled time. Can any one share some ideas or concepts?

    I am using PHP and MySQL running in Linux Server.

    • doniyor
      doniyor over 11 years
      i am almost hearing people typing answers as fast as possible.. :D
    • Jason McCreary
      Jason McCreary over 11 years
      @doniyor, indeed. I spent more time overcoming the 30 character minimum. Vote to close.
    • shaz3e
      shaz3e almost 7 years
      I have the same question but I want a little more my script to do for me. I have a page where I update price automatically but it requires a button to be clicked to update price how can I do that? any solution?