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.

[Plugin] CA User Scripts

Featured Replies

Bug: "Apply" does nothing if any script's folder name contains "@"

Plugin: CA User Scripts, v2025.06.21 (current master) · Unraid: 7.3.2

Symptom: Clicking Apply after changing any script's schedule does nothing — no confirmation, no save, no network request. Happens for every schedule change, not just one script.

Root cause: I created a script called Folding@Home helper named F@H Start (folder literally has an @). In Userscripts.page, the per-row element id is built from the folder name but only strips spaces/periods (lines 37-38), leaving @ intact (id="customscheduleF@HStart"). The Apply handler, applySchedule() (lines 245-259), loops over every schedule row and does $("#custom"+this.id).val() before it ever posts:

Fix: Rename the folder via terminal and remove "@". User Scripts Apply button will work again upon refresh.

  • Replies 2.1k
  • Views 584.4k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I could make up something long, convoluted, and technical as a reason why it doesn't do that but it would all be bs.  The simple answer is that when I did this, I never thought of that, and why it sti

  • Hi All - We have a fix and are publishing a Connect plugin update to fix it today. Thanks for letting us know.

  • @Squid I tried many commands and by that I found out that pkill does not kill (all) child processes: root@Thoth:/tmp# pgrep -f isleep2m | xargs --no-run-if-empty ps fp PID TTY STAT T

Posted Images

On 10/27/2025 at 7:14 PM, OsoPolar said:

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 bootcat > /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 || truecp /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.

I can confirm that this is the case with the "standard" User Scripts Plugin.

Only I run under Unraid 7.3.2 with User Scripts 2025.06.21.

So if there is need of any information for fixing this in the "standard" version let me know.

After I added the "Enhanced" version it works. Enhanced 2026.08.29

Edited by LMD

On 9/4/2026 at 4:44 PM, Whiskey90 said:

Bug: "Apply" does nothing if any script's folder name contains "@"

Plugin: CA User Scripts, v2025.06.21 (current master) · Unraid: 7.3.2

Symptom: Clicking Apply after changing any script's schedule does nothing — no confirmation, no save, no network request. Happens for every schedule change, not just one script.

Root cause: I created a script called Folding@Home helper named F@H Start (folder literally has an @). In Userscripts.page, the per-row element id is built from the folder name but only strips spaces/periods (lines 37-38), leaving @ intact (id="customscheduleF@HStart"). The Apply handler, applySchedule() (lines 245-259), loops over every schedule row and does $("#custom"+this.id).val() before it ever posts:

Fix: Rename the folder via terminal and remove "@". User Scripts Apply button will work again upon refresh.

Did you read the how to add a script? Due it stated that @ is not allowed in the name of the script.

To add your own user scripts, on the flash drive within the config/plugins/user.scripts/scripts folder, create a new folder for a script (the name does not matter of the folder but it can only contain the following characters: letters ([A-Za-z]), digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), periods ("."), and spaces (" "). Any other characters will impact the ability to run the script in the background.Within that folder, create a file called description which contains the description of the script.
Create a file called script which contains the actual script. Notepad can be used to do this on Windows machines, as prior to being executed, DOS line endings are automatically converted to Linux style line endings. #!/bin/bash will even be automatically added to the start of the script before execution Note that user interaction (ie: answering questions within the script) will NOT work. Also, if there are any dependencies for the script (ie: other scripts), those can be called as usual, but make note that during execution, the script does not run from the flash drive (ie: include the full path to any dependency scripts) There is no point in running a particular script in the background if the script displays text that you need to see (ie: displaying the size of the docker logs)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.