nerbonne Posted October 22, 2020 Share Posted October 22, 2020 10 hours ago, mgutt said: Updated today, now "RUN IN BACKGROUND" button does not work anymore. Popup window opens, but stays white and script is not executed. All the scripts are chmod to 600 which prevents them from being run. Additionally, running the command "chmod 700 script" has no effect but also generates no error. Quote Link to comment
Squid Posted October 22, 2020 Author Share Posted October 22, 2020 52 minutes ago, nerbonne said: All the scripts are chmod to 600 which prevents them from being run. Additionally, running the command "chmod 700 script" has no effect but also generates no error. User Scripts does not directly execute the scripts, so permissions don't matter. They are changed to be linux style line endings (so that a DOS editor will work on the files if you want), and then executed from /tmp with permissions of 0777. But, yeah run in background isn't working for some reason.... Will look into it Quote Link to comment
Allram Posted October 22, 2020 Share Posted October 22, 2020 7 hours ago, Squid said: User Scripts does not directly execute the scripts, so permissions don't matter. They are changed to be linux style line endings (so that a DOS editor will work on the files if you want), and then executed from /tmp with permissions of 0777. But, yeah run in background isn't working for some reason.... Will look into it This is the error message i get if i try to start a script running in the background: Oct 22 20:58:35 Tower emhttpd: cmd: /usr/local/emhttp/plugins/user.scripts/showLog.php Out of Memory Oct 22 20:58:35 Tower emhttpd: cmd: /usr/local/emhttp/plugins/user.scripts/showLog.php Out of Memory Quote Link to comment
Squid Posted October 23, 2020 Author Share Posted October 23, 2020 On 10/21/2020 at 8:42 PM, mgutt said: Updated today, now "RUN IN BACKGROUND" button does not work anymore. Popup window opens, but stays white and script is not executed. Fixed 1 Quote Link to comment
cinereus Posted October 29, 2020 Share Posted October 29, 2020 When running in background the "Abort script" button does work leaving many phantom processes still running without the ability to end them without detective work and the kill command. Is there a way to fix this? Quote Link to comment
mgutt Posted October 29, 2020 Share Posted October 29, 2020 13 minutes ago, cinereus said: When running in background the "Abort script" button does work leaving many phantom processes still running without the ability to end them without detective work and the kill command. Is there a way to fix this? This is a bug: https://forums.unraid.net/topic/48286-plugin-ca-user-scripts/page/43/?tab=comments#comment-881200 Quote Link to comment
cinereus Posted October 29, 2020 Share Posted October 29, 2020 45 minutes ago, mgutt said: This is a bug: https://forums.unraid.net/topic/48286-plugin-ca-user-scripts/page/43/?tab=comments#comment-881200 Thanks. Do we know whether it will be addressed any time soon? Quote Link to comment
mgutt Posted November 4, 2020 Share Posted November 4, 2020 (edited) I don't know why, but downloading one of my scripts log files killed the complete server (WebGUI dead, Samba service dead, no server HDMI output). At the moment the parity check is running. After it has been finished I will: delete the log of the script restart the script, so a fresh log file is generated stop the array copy the log file through terminal to my SSD download the log file download the log zip file through CA User Scripts and see if the error happens again If I should check something else before the last step, post it At the moment I suspect the CPU undervolting, although it worked for a long time now. Edited November 4, 2020 by mgutt Quote Link to comment
Ryguy Posted November 5, 2020 Share Posted November 5, 2020 I have a script that is running great when I manually tell it to do so, or in the background but does not seem to be responding to my custom CRON schedule. I would like it to run every Thursday at 2am so I have set the CRON fiel to be 02**THU. The log however indicates a failure to parse CRON job and goes into a loop. I saw that weekly is an option, but am unsure how to set the day and time of the weekly schedule. Can someone help? Quote Link to comment
Hoopster Posted November 5, 2020 Share Posted November 5, 2020 9 minutes ago, Ryguy said: I saw that weekly is an option, but am unsure how to set the day and time of the weekly schedule. Can someone help? I have a cron job that runs every Monday at 1 am. In User Scripts it is 0 1 * * 1. Yours should be 0 2 * * 4 (perhaps THU also works but I use the ordinal number). You need a space between each element as well. 2 Quote Link to comment
Ryguy Posted November 5, 2020 Share Posted November 5, 2020 12 minutes ago, Hoopster said: I have a cron job that runs every Monday at 1 am. In User Scripts it is 0 1 * * 1. Yours should be 0 2 * * 4 (perhaps THU also works but I use the ordinal number). You need a space between each element as well. Thank you will give this a try. Quote Link to comment
Cessquill Posted November 5, 2020 Share Posted November 5, 2020 24 minutes ago, Ryguy said: I have a script that is running great when I manually tell it to do so, or in the background but does not seem to be responding to my custom CRON schedule. I would like it to run every Thursday at 2am so I have set the CRON fiel to be 02**THU. The log however indicates a failure to parse CRON job and goes into a loop. I saw that weekly is an option, but am unsure how to set the day and time of the weekly schedule. Can someone help? In the top left of the page there's a "What Is Cron" line. Hover over this for a popup of the interpretation that this follows. Took me a couple of goes to get mine working since there's a few different ways to express the same thing, and not all Cron systems accept the same structure. 1 Quote Link to comment
Ryguy Posted November 5, 2020 Share Posted November 5, 2020 55 minutes ago, Cessquill said: In the top left of the page there's a "What Is Cron" line. Hover over this for a popup of the interpretation that this follows. Took me a couple of goes to get mine working since there's a few different ways to express the same thing, and not all Cron systems accept the same structure. This was very helpful thanks. Got me sorted out completely! 1 Quote Link to comment
Ryguy Posted November 5, 2020 Share Posted November 5, 2020 1 hour ago, Hoopster said: I have a cron job that runs every Monday at 1 am. In User Scripts it is 0 1 * * 1. Yours should be 0 2 * * 4 (perhaps THU also works but I use the ordinal number). You need a space between each element as well. This was the prob. Cheers Quote Link to comment
Supa Posted November 8, 2020 Share Posted November 8, 2020 How would I run python scripts in UserScripts? I have python enabled and installed via nerdpack. Quote Link to comment
Adznon Posted November 8, 2020 Share Posted November 8, 2020 On 6/14/2020 at 12:01 AM, Aerodb said: Same issue happened for me. If I change the timing(or disable) any of the scripts, apply lights up(so i can click it). but when i actually click, nothing happens. upon refresh or revisiting this page the changes are not saved. it worked a few minutes ago but not its not. @Aerodb I'm having the same problem, did you ever get this solved ? Quote Link to comment
Aerodb Posted November 9, 2020 Share Posted November 9, 2020 7 hours ago, Adznon said: @Aerodb I'm having the same problem, did you ever get this solved ? Yes I figured it out. I had to remove the recently added scripts and re add them. That fixed it right up. Quote Link to comment
mdrodge Posted November 9, 2020 Share Posted November 9, 2020 On 11/5/2020 at 7:14 PM, Hoopster said: I have a cron job that runs every Monday at 1 am. In User Scripts it is 0 1 * * 1. Yours should be 0 2 * * 4 (perhaps THU also works but I use the ordinal number). You need a space between each element as well. Cron Schedule needs a space. (* * * * *) not (*****) that explains my problem. Quote Link to comment
Adznon Posted November 10, 2020 Share Posted November 10, 2020 On 11/9/2020 at 3:22 AM, Aerodb said: Yes I figured it out. I had to remove the recently added scripts and re add them. That fixed it right up. Worked for me as well. Many thanks has been bugging me for a while now 1 Quote Link to comment
cyruz Posted November 20, 2020 Share Posted November 20, 2020 (edited) Hello guys, I'm wondering why when I run a script, if inside the script I run some program in background the script doesn't terminate correctly (in the console window doesn't appear the "DONE" button). The script itself works and terminates ok if run it from the terminal. Is this an intended behavior? If yes, can it be circumvented in some ways? Thanks. Edited November 20, 2020 by cyruz Quote Link to comment
vw-kombi Posted November 21, 2020 Share Posted November 21, 2020 Is there any way to re-order the scripts ? Further, maybe a grouping of them too. Mine are all over the place as it has grown over time. I have started prefixing them with stuff to group them (Daily, Weekly, OneOffs, OffsiteBackups) - but they are still spread all over. Ideally, if they could be sorted then they would all 'get together'. Quote Link to comment
Croontje Posted November 22, 2020 Share Posted November 22, 2020 On 11/21/2020 at 9:17 AM, vw-kombi said: Is there any way to re-order the scripts ? Further, maybe a grouping of them too. Mine are all over the place as it has grown over time. I have started prefixing them with stuff to group them (Daily, Weekly, OneOffs, OffsiteBackups) - but they are still spread all over. Ideally, if they could be sorted then they would all 'get together'. I was wondering the same, mainly because I want to group disabled/unused scripts to clean up the list Quote Link to comment
jmbailey2000 Posted November 25, 2020 Share Posted November 25, 2020 On 11/22/2020 at 2:47 PM, Croontje said: I was wondering the same, mainly because I want to group disabled/unused scripts to clean up the list I haven't tried it yet (have the same issue) but I believe it is based alphabetically off the file name of the script. I tried just changing the name but that didn't work, so I'm guessing have to rename the script file itself and then add it to the UserScripts page again. Quote Link to comment
jmbailey2000 Posted November 25, 2020 Share Posted November 25, 2020 On 11/5/2020 at 2:29 PM, Cessquill said: In the top left of the page there's a "What Is Cron" line. Hover over this for a popup of the interpretation that this follows. Took me a couple of goes to get mine working since there's a few different ways to express the same thing, and not all Cron systems accept the same structure. crontab.guru is an online page that I use. Let's me put stuff in and shows you the result. Also has a huge page of examples of almost every type. Quote Link to comment
Recommended Posts
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.