M
M
Magzhan Birgebayuly2016-02-11 15:28:01
PHP
Magzhan Birgebayuly, 2016-02-11 15:28:01

How can I make apache+php send itself a request every hour?

There is a page, let's call it: /query
It is necessary that every hour HTTP sends a GET request, such as /query?time=123.
I have only one idea:
Enable a browser on the server and create a page that will send a request every hour using JavaScript. But I would not like to launch the browser every time if the computer shuts down or something like that.
It is necessary - that when you turn on Apache2, they immediately start sending requests to a specific page.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Artem Gribkov, 2016-02-11
@henhanshi

Create a script of some kind that will do for example:
Put it in cron with a frequency of an hour and it seems like everything should work fine :)

E
Evgeniy Samoilenko, 2016-02-11
@samoilenkoevgeniy

discover cron

R
Regretful, 2016-02-11
@regretful

cron+curl

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question