V
V
Vladimir2021-11-20 12:10:28
Raspberry Pi
Vladimir, 2021-11-20 12:10:28

How to make deamon on Raspberry Pi pull url every second?

Hello! I have Apache on my Raspberry Pi. I need to make a type of pending tasks in php for a smart home. I need the raspberry to pull the page with the script 1 time for example http://127.0.0.1:80/taskmanager.php and thus execute my script. Please tell me how to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2021-11-20
@firedragon

https://habr.com/ru/company/southbridge/blog/255845/
Adjust for yourself

[Unit]
Description=Ping service

[Service]
WorkingDirectory=/tmp
ExecStart=/usr/bin/wget http://127.0.0.1/taskmanager.php
Restart=always
# Restart service after 60 seconds 
RestartSec=60
KillSignal=SIGINT
SyslogIdentifier=pingsvc
User=www-root
#Environment=ASPNETCORE_ENVIRONMENT=Production
#Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question