Ryguy 2 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 post
Cessquill 60 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 post
Ryguy 2 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 post
Ryguy 2 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 post
Supa 1 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 post
Adznon 1 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 post
Aerodb 4 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 post
mdrodge 2 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 post
Adznon 1 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 post
cyruz 0 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 post
vw-kombi 4 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 post
Croontje 0 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 post
jmbailey2000 4 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 post
jmbailey2000 4 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 post
Cessquill 60 Posted November 25, 2020 Share Posted November 25, 2020 1 hour ago, jmbailey2000 said: 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. Yes, I've used a couple of different ones, but like I say - the reference on the plugin page is useful as it shows the format that it specifically accepts. Quote Link to post
thymon 0 Posted November 27, 2020 Share Posted November 27, 2020 (edited) hello, I'm noob to use a script... Can I run this example : docker exec -it nextcloud sudo -u abc php7 /config/www/nextcloud/occ files:scan --all Edited November 27, 2020 by thymon Quote Link to post
Squid 2900 Posted November 28, 2020 Author Share Posted November 28, 2020 You definitely want to get rid of the -i as that means interactive Quote Link to post
thymon 0 Posted November 28, 2020 Share Posted November 28, 2020 6 hours ago, Squid said: You definitely want to get rid of the -i as that means interactive nice ! Thanks 😊 Quote Link to post
MajorTomG 1 Posted December 6, 2020 Share Posted December 6, 2020 I'm new to this and I'm hoping I can use this plugin to call the radarr V3 API. Specifically the /command endpoint ImportListSyncCommand. Is this possible? Where would I start? Quote Link to post
trurl 1519 Posted December 6, 2020 Share Posted December 6, 2020 48 minutes ago, MajorTomG said: I'm new to this and I'm hoping I can use this plugin to call the radarr V3 API. Specifically the /command endpoint ImportListSyncCommand. Is this possible? Where would I start? See a few posts above for another example of running a command inside a docker. Quote Link to post
Stupifier 40 Posted December 7, 2020 Share Posted December 7, 2020 How do I run any CA Userscript Script from within a Terminal Session? I know copies of scripts are held and ran from " /tmp/user.scripts/tmpScripts"....but when I go there via Terminal...I don't see ALL of my scripts listed (only a subset). It appears the only scripts listed here are ones which have been previously executed through Userscripts GUI. I know scripts are also located in "/boot/config/plugins/user.scripts/scripts" but those are all buttoned up with permissions restricting run (probably for good reason too since its the flash drive). Quote Link to post
zaymus 0 Posted December 7, 2020 Share Posted December 7, 2020 I'm trying to host a discord bot I made in python using the discordpy library, and I wanted to have the script ran every hour. however I'm not to experienced with bash so i'm a little stuck on running the script. this is the code I tried and I have installed the nerdpack plugin and enabled python3 in the settings. I have also rebooted my server after installing/enabling #!/bin/bash cd /mnt/user/scripts/Predicting_Alpha_Bot python bot.py When I run the script using the user script plugin it shows an error saying unknown command 'python'. I'm not sure if I have to specify the python path or anything so any help would be greatly appreciated! Quote Link to post
trurl 1519 Posted December 7, 2020 Share Posted December 7, 2020 7 minutes ago, zaymus said: specify the python path Try it Quote Link to post
zaymus 0 Posted December 7, 2020 Share Posted December 7, 2020 24 minutes ago, trurl said: Try it I'm new to unraid and not very experienced in bash so I'm not really sure how to try it or find the python path Quote Link to post
hawihoney 16 Posted December 9, 2020 Share Posted December 9, 2020 [BUG] German Umlauts [äöüÄÖÜß] disappear during save I do have some scripts that do require German Umlauts (see above). I can put them into the big edit field but they disappear after saving the user script. For example: Within a user script I do call a python script to export data. I enter something like that (shortened): python3 [path]/ExportData.py -l Hörbücher After saving and reopening the script this is what became stored: python3 [path]/ExportData.py -l Hrbcher Thanks. Quote Link to post
1216 posts in this topic Last Reply
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.