Mobile app version of vmapp.org
Login or Join
Fox8124981

: How to run the PHP script at scheduled time I need a valuable suggestion that I have to run the PHP script at the scheduled time daily to update some fields in database and to send automated

@Fox8124981

Posted in: #Linux #Mysql #Php

I need a valuable suggestion that I have to run the 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, MySQL, Linux.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Fox8124981

2 Comments

Sorted by latest first Latest Oldest Best

 

@Cofer257

If you have dedicated or virtual hosting then you should be able to set up a cron job that calls PHP via command line. Actually the easiest way I've found is to use wget to fetch it as a web page, which helps if you are using frameworks or rewriting URLs instead of one single PHP file. Something like:

wget -o /dev/null "http://example.com/page"


You can use wget from any (Linux) computer anywhere. You can do similar from your own PC if you like using Scheduled Tasks.

10% popularity Vote Up Vote Down


 

@Turnbaugh106

Easiest way is to set up a cronjob that triggers a php script in php-cli.
en.wikipedia.org/wiki/Cron www.pantz.org/software/cron/croninfo.html

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme