Query in a Web Service every 1 minute [closed]

6

I have a Web Service in JSON, which I'm querying through a PHP page and saving the data to a MySQL database. This Web Service contains information from some sensors and every 1 minute I wanted to do this query and save that data in the database. How would I do to make this timed query?

    
asked by anonymous 06.04.2016 / 21:54

1 answer

-5

Good morning, friend, are you using windows or linux?

I did this using windows, which takes web service information through a PHP page and records every hour.

As I use windows as a server I did the following, I created a .BAT with the following code.

@ECHO OFF

:start

"C:\xampp\php\php.exe" -f "C:\xampp\htdocs\atualizaCadastro\Atualizar.php"

And I scheduled the tasks on windows to run this bat hourly.

Now you only have to adapt to use in a linux.

If you have any include on your page, it has to contain the entire path from the c: ....

    
07.04.2016 / 13:45