A template project to bootstrap your PHP async scripts.
Install the dependencies via Composer:
composer install --no-dev -o
Override the environment variables by creating a .env.local
file.
LOG_LEVEL=DEBUG
DATABASE_MYSQL_PASSWORD=...
Installing the extension from PECL is not up to date with PHP 8.1. You should install it from source.
Launch the script from the command line:
./bin/script
Or link the systemd unit files (with super admin rights):
systemctl link systemd/script.{service,timer}
# Activate the script's service
systemctl daemon-reload
systemctl enable script.{service,timer}
systemctl start script.{service,timer}
# Check if it is running
systemctl list-timers
systemctl status script.service