0

I'm new to server-side programming and running a server in general, and I'm using xampp. I have a hellp.php file in the htdocs directory of xampp, and that's how I run my PHP code. However what I'm looking for, is to have some PHP code execute in the background of my server (not on a webpage). I'm looking for a sort of php application that just runs in the background and does stuff whenever the server starts up.

For example, in this case I want to retrieve some data from Facebook's Graph (a list of conversations from a facebook page) every X seconds and store it in a SQL database somewhere. How can I accomplish this?

Andrew Kor
  • 579
  • 7
  • 19

1 Answers1

0

Linux

If you're on linux, you can create a cron job as described here by @IliaRostovtsev.

Windows

If you're on windows, use scheduled tasks as described here by @Pierre.

Jonathan Gagne
  • 4,241
  • 5
  • 18
  • 30