nixos-module: add scheduler timer for artisan schedule:run
Invoice Ninja relies on Laravel's scheduler for recurring invoices, scheduled reports, and other internal cron-driven jobs. Without a systemd unit invoking `artisan schedule:run` periodically, the app's dashboard reports "cron jobs are not enabled" after login. Adds invoiceninja-scheduler.timer (every minute, matching upstream's documented cron cadence) and its oneshot service, and extends the automated test to assert the timer is active and schedule:run succeeds. Note: the app's own is_scheduler_running flag only flips on a 5-minute wall-clock boundary (app/Console/Kernel.php's everyFiveMinutes() job), so the dashboard warning can take a few minutes to clear after boot - confirmed working via the "Refresh Data" button in that same modal. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,11 @@ pkgs.testers.nixosTest {
|
||||
with subtest("invoiceninja-manage wrapper can run artisan commands"):
|
||||
machine.succeed("invoiceninja-manage migrate:status")
|
||||
|
||||
with subtest("scheduler timer is enabled and schedule:run succeeds"):
|
||||
# Without this, the app's dashboard reports "cron jobs are not enabled".
|
||||
machine.succeed("systemctl is-active invoiceninja-scheduler.timer")
|
||||
machine.succeed("systemctl start --wait invoiceninja-scheduler.service")
|
||||
|
||||
with subtest("admin account can log in via the API"):
|
||||
login_response = machine.succeed(
|
||||
"curl -sf -X POST http://localhost/api/v1/login "
|
||||
|
||||
Reference in New Issue
Block a user