From b49ce8a895fef517c10c86394bd4a1d29cfe21c1 Mon Sep 17 00:00:00 2001 From: Craig Williams Date: Thu, 20 Jun 2024 16:10:43 +0100 Subject: [PATCH] Update 'README.md' --- README.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c5a57e0..44d286b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,35 @@ # sprinkle-scheduler -A UserFrosting sprinkle to add scheduled events \ No newline at end of file +A UserFrosting sprinkle to add scheduled events. + +Either a crontab set to run once a minute is required or a systemd timer: + +Systemd service: /etc/systemd/system/uf-scheduler.service +```systemd +[Unit] +Description=UserFrosting Scheduler + +[Service] +Restart=no +Type=simple +ExecStart=/usr/bin/php bakery schedule -n +WorkingDirectory=/srv/UserFrosting +User=www-data +Group=www-data + +[Install] +WantedBy=multi-user.target +``` +Systemd timer: /etc/systemd/system/uf-scheduler.timer +```systemd +[Unit] +Description=UserFrosting Scheduler trigger + +[Timer] +OnCalendar=*-*-* *:*:00 +Persistent=true +Unit=uf-scheduler.service + +[Install] +WantedBy=multi-user.target +``` \ No newline at end of file