Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

User Scripts: schedules not saved to cron even after “Apply” (Unraid 7.1.x)

Featured Replies

Summary
The User Scripts plugin shows a “Custom” schedule (*/30 * * * *) and “Run in background,” but no cron entry is created. Scripts run manually fine, yet never run on schedule.


Environment

  • Unraid: 7.1.4 (Pro)

  • User Scripts plugin: current as of 26 Oct 2025 (standard; not Enhanced)

  • Hardware: standard build (nothing exotic)


The script (works manually)

Script path:

/boot/config/plugins/user.scripts/scripts/Tailscale Serve Reapply/script

What it does: resets Tailscale “serve” table and reapplies mappings; runs docker exec nextcloud occ status; writes a log to:

/var/log/tailscale-serve-reapply.log

Manual run works:

/boot/config/plugins/user.scripts/scripts/Tailscale\ Serve\ Reapply/script
tailscale serve status   # shows expected ports

Expected vs actual

  • Expected: After setting Schedule → Custom → */30 * * * * and clicking Apply, the plugin writes a cron entry and the script runs every 30 minutes.

  • Actual: The UI looks set, but there is no cron entry anywhere, and the script never runs on schedule.

Evidence:

# cron is alive
pgrep -x crond

# /boot is writable
mount | grep ' /boot '
touch /boot/.rwtest && echo OK && rm /boot/.rwtest

# no cron entry created
grep -H . /etc/cron.d/* /var/spool/cron/* /var/spool/cron/crontabs/* 2>/dev/null || echo "no cron entries"

Results: cron running, /boot RW, but no user-scripts cron line present.


Reproduction steps

  1. Create script under User Scripts → “Tailscale Serve Reapply.”

  2. Set Schedule: Custom, value */30 * * * *. Tick Run in background.

  3. Click Apply.

  4. Check cron paths above. No entry is created. Script only runs manually.


Notes / likely causes seen by other users

  • Scripts with names containing ! or () can break the gear menu and/or scheduler for all scripts. Renaming those directories under /boot/config/plugins/user.scripts/scripts/ can restore saving behavior.

  • Some users report missing csrf_token in logs when clicking Apply; schedules then fail to save.

  • The plugin executes scripts from /tmp/user.scripts/tmpScripts/... via PHP; PATH differences are normal, but unrelated to schedules not writing.


Workaround (safe, reversible)

Wire the cron entry directly and recreate it at boot (without moving or renaming the script).

Add a cron snippet now:

SCRIPT="/boot/config/plugins/user.scripts/scripts/Tailscale Serve Reapply/script"

cat > /etc/cron.d/tailscale-serve-reapply <<EOF
*/30 * * * * root sh -lc '$SCRIPT >> /var/log/tailscale-serve-reapply.log 2>&1'
EOF

killall -HUP crond 2>/dev/null || true

# verify
grep -n tailscale-serve-reapply /etc/cron.d/*

Persist across reboot (append to /boot/config/go):

cp /boot/config/go /boot/config/go.bak   # backup once

cat >> /boot/config/go <<'BOOTBLOCK'
# re-add Tailscale Serve cron at boot
cat > /etc/cron.d/tailscale-serve-reapply <<'EOF'
*/30 * * * * root sh -lc '/boot/config/plugins/user.scripts/scripts/Tailscale Serve Reapply/script >> /var/log/tailscale-serve-reapply.log 2>&1'
EOF
killall -HUP crond 2>/dev/null || true
BOOTBLOCK

To remove later:

rm -f /etc/cron.d/tailscale-serve-reapply
killall -HUP crond 2>/dev/null || true
cp /boot/config/go.bak /boot/config/go   # if you want to roll back the go edit

What we tried before posting

  • Verified cron is running and /boot is writable.

  • Confirmed the script runs and logs when executed manually.

  • Confirmed no cron entries are created by the plugin after clicking Apply.

  • Renamed any “cursed” script names (removed ! and parentheses) and retried Apply. Still no cron entry.


Request to maintainers

  • Please advise on known issues where Apply does not write schedules (e.g., CSRF token failures, UI state desync).

  • If there’s a canonical location the plugin writes cron (system vs user crontab), please document it.

  • If certain script names can block scheduler generation, can the UI enforce allowed characters or warn?

Happy to provide diagnostics or specific logs (syslog around Apply time, plugin PHP logs) if needed.

  • Community Expert

It works for me, but please use the existing plugin support thread:

  • JorgeB locked this topic
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.