M
M
Michael2021-04-26 11:42:18
PHP
Michael, 2021-04-26 11:42:18

Implementing pending tasks on a local server?

To begin with, I would like to understand in which direction to dig, so I will briefly outline the task:
The local server has a web interface for managing a smart home. All modules are connected via iframe blocks by ip-address.

It is necessary to implement the execution of scripts (similar to tasks in Home Assistant) set by the user:
* at 15:30 turn on the light bulb
* If the temperature is above 35 degrees - turn on the air conditioner

Is it possible to do this using post-requests?
Let's say the user's request will be processed and stored in the database, via ajax, checked every minute for conditions and, if the condition is met, send the request to the iframe, while deleting it from the database.

I heard about Task Sheduler and Cron, but as I understand it, they all need an Internet connection? Is it possible to implement something similar on the local network, if the Internet is turned off in the house so that all scripts continue to run offline.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
cicatrix, 2021-04-26
@cicatrix

Task Scheduler and Cron, but I understand they all need an internet connection

Where is this nonsense from? Maybe read their documentation first?
Cron or Task Sheduler is exactly what you need if you need it simply and quickly.

I
irishmann, 2021-04-26
@irishmann

Cron, it doesn't need internet itself, it just runs your script
https://losst.ru/nastrojka-cron

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question