V
V
Vladimir2021-07-03 13:45:20
PHP
Vladimir, 2021-07-03 13:45:20

How to configure cron to load a page every second?

Hello! I am writing a bot for my needs. He is hosted. What I need right now is a planner. That is, a stream page to which I can send commands with a timer. Example:
execute 1st command in 2 seconds,
2nd command in 5 seconds and so on.

There is nothing complicated and supernatural. I need to automatically run a script 1 time per second. In the crown, you can not more than once a minute. What should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Antonio Solo, 2021-07-03
@solotony

for good, you need to run your demon, which once a second will perform the required action. if hosting allows - do so. if not allowed, run a task from cron, which will perform the required action once per second. but for sure, cron tasks on hosting have some restrictions (age, cpu limit), so you need to restart and monitor that several copies are not running. and it's not always an easy task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question