September 4Sep 4 Bug: "Apply" does nothing if any script's folder name contains "@"Plugin: CA User Scripts, v2025.06.21 (current master) · Unraid: 7.3.2Symptom: 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.
Wednesday at 07:46 AM4 days On 10/27/2025 at 7:14 PM, OsoPolar said:SummaryThe 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.EnvironmentUnraid: 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 actualExpected: 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 stepsCreate script under User Scripts → “Tailscale Serve Reapply.”Set Schedule: Custom, value */30 * * * *. Tick Run in background.Click Apply.Check cron paths above. No entry is created. Script only runs manually.Notes / likely causes seen by other usersScripts 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 editWhat we tried before postingVerified 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 maintainersPlease 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 Wednesday at 07:48 AM4 days by LMD
Wednesday at 07:52 AM4 days 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.2Symptom: 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.