dikkiedirk Posted August 1, 2017 Share Posted August 1, 2017 I am trying user scripts to shutdown my server at night. Would these lines work? #!/bin/bash powerdown | at 01:30 Should the powerdown plugin be installed, or is this functionality now included in unraid 6.3.5? Quote Link to comment
Squid Posted August 16, 2017 Author Share Posted August 16, 2017 On 8/1/2017 at 9:37 AM, dikkiedirk said: I am trying user scripts to shutdown my server at night. Would these lines work? #!/bin/bash powerdown | at 01:30 Should the powerdown plugin be installed, or is this functionality now included in unraid 6.3.5? Should work. Or simply #!/bin/bash powerdown And set the schedule to run when you want. Quote Link to comment
kaiguy Posted August 16, 2017 Share Posted August 16, 2017 Is there any reason the delete.ds_store script wouldn't actually delete all the .ds_store files? Tried it last night after Fix Common Problems found a bunch of duplicate .ds_store files spanning pretty much all of my shares. I disabled the creation of .ds_store files on my Macs, ran the user script, then ran the Fix Common Problems extended test again. Still had many, many dupes. So I went through and manually deleted them. Just curious if I did something wrong, or that script perhaps needs an update. Thanks! Quote Link to comment
Squid Posted August 16, 2017 Author Share Posted August 16, 2017 36 minutes ago, kaiguy said: Is there any reason the delete.ds_store script wouldn't actually delete all the .ds_store files? Tried it last night after Fix Common Problems found a bunch of duplicate .ds_store files spanning pretty much all of my shares. I disabled the creation of .ds_store files on my Macs, ran the user script, then ran the Fix Common Problems extended test again. Still had many, many dupes. So I went through and manually deleted them. Just curious if I did something wrong, or that script perhaps needs an update. Thanks! No reason that I can think of. I don't really support the scripts (even the default included). They're just samples Quote Link to comment
dikkiedirk Posted August 17, 2017 Share Posted August 17, 2017 (edited) On 8/16/2017 at 2:47 AM, Squid said: Should work. Or simply #!/bin/bash powerdown And set the schedule to run when you want. how do I schedule this at 11:30 or 00:30? what is the correct cron syntax for this? the online generator doesn't seem to work. Edited August 17, 2017 by dikkiedirk Quote Link to comment
Squid Posted August 17, 2017 Author Share Posted August 17, 2017 20 minutes ago, dikkiedirk said: how do I schedule this at 11:30 or 00:30? 30 23 * * * 30 0 * * * Quote Link to comment
dikkiedirk Posted August 17, 2017 Share Posted August 17, 2017 thanks, I just googled it. shame on me, always asking. and its working. thanks! Quote Link to comment
kizer Posted August 17, 2017 Share Posted August 17, 2017 2 hours ago, dikkiedirk said: thanks, I just googled it. shame on me, always asking. and its working. thanks! Best site ever. http://corntab.com/ Quote Link to comment
Squid Posted August 17, 2017 Author Share Posted August 17, 2017 (edited) 50 minutes ago, kizer said: Best site ever. http://corntab.com/ Same site that's linked to in user scripts EDIT: Albeit user scripts goes to http://www.corntab.com which used to work. Now it doesn't. Only http://corntab.com works Edited August 17, 2017 by Squid Quote Link to comment
kizer Posted August 17, 2017 Share Posted August 17, 2017 15 minutes ago, Squid said: Same site that's linked to in user scripts EDIT: Albeit user scripts goes to http://www.corntab.com which used to work. Now it doesn't. Only http://corntab.com works Yep I know it is. That's how I found it. Quote Link to comment
allanp81 Posted August 22, 2017 Share Posted August 22, 2017 When running a user script manually, does it run as a different user versus being run via a schedule? Quote Link to comment
Squid Posted August 22, 2017 Author Share Posted August 22, 2017 When running a user script manually, does it run as a different user versus being run via a schedule?Everything should run as rootSent from my LG-D852 using Tapatalk Quote Link to comment
allanp81 Posted August 22, 2017 Share Posted August 22, 2017 Hmm, that's what I thought but I seem to get different results depending on how the script is initiated. Quote Link to comment
Squid Posted August 22, 2017 Author Share Posted August 22, 2017 Hmm, that's what I thought but I seem to get different results depending on how the script is initiated.Explain...Admittedly I have never checked what user a cron entry runs as thoughSent from my LG-D852 using Tapatalk Quote Link to comment
allanp81 Posted August 22, 2017 Share Posted August 22, 2017 I had a script that ran the rc.unassigned script from the unassigned drivers plugin. The path to is something like /usr/local/plugins. This works fine if I manually kick the script off but fails when the script runs via a schedule, it claims the path doesn't exist. Quote Link to comment
Squid Posted August 22, 2017 Author Share Posted August 22, 2017 Shouldn't make any difference. But, you have to bear in mind that all paths anywhere in a script should be absolute, and not relative. That, and IIRC (would have to double check after work), but the scripts have slightly different /tmp folders that they execute from depending upon how its started. Quote Link to comment
ozkhan1 Posted August 22, 2017 Share Posted August 22, 2017 I am using the vm backup script, is there anyway to schedule what time it runs? I don't see any option to schedule a time for it? Also is there any option to delete older backups? thanks Quote Link to comment
Squid Posted August 23, 2017 Author Share Posted August 23, 2017 4 hours ago, ozkhan1 said: I am using the vm backup script, is there anyway to schedule what time it runs? I don't see any option to schedule a time for it? Also is there any option to delete older backups? thanks Assuming you're running the autovmbackup scripts. That, (and any script) run through User Scripts can be scheduled via the Schedule setting next to the script. Quote Link to comment
ozkhan1 Posted August 23, 2017 Share Posted August 23, 2017 (edited) On 6/26/2016 at 10:50 PM, Squid said: Assuming you're running the autovmbackup scripts. That, (and any script) run through User Scripts can be scheduled via the Schedule setting next to the script. 0 Sent from my LG-D852 using Tapatalk i can schedule it but it doesnt allow me to pick days/dates/times etc.. i get a drop down for picking weekly/daily/monthly etc and when i click apply, it says schedule applied. perhaps i need to choose the custom schedule? if so will you be kind enough to provide the guidelines around the format it expects the information in? Edited August 23, 2017 by ozkhan1 Quote Link to comment
Squid Posted August 23, 2017 Author Share Posted August 23, 2017 http://corntab.com or search for cron on wikipedia . or hover over the what is cron link on the bottom leftSent from my LG-D852 using Tapatalk Quote Link to comment
osker246 Posted August 30, 2017 Share Posted August 30, 2017 I have been having an issue where I use rsync, via User Scripts, to perform backups to a remote server and that would make the webGUI unresponsive until the task was completed. Strange thing is I can run the rsync task via shell and I do not have any issues not being able to use the webGUI. Any idea why this is occurring? Quote Link to comment
Squid Posted August 30, 2017 Author Share Posted August 30, 2017 I have been having an issue where I use rsync, via User Scripts, to perform backups to a remote server and that would make the webGUI unresponsive until the task was completed. Strange thing is I can run the rsync task via shell and I do not have any issues not being able to use the webGUI. Any idea why this is occurring?If you're running the script in the foreground perfectly normal. If you're running it in the background no ideaSent from my LG-D852 using Tapatalk Quote Link to comment
osker246 Posted August 30, 2017 Share Posted August 30, 2017 If you're running the script in the foreground perfectly normal. If you're running it in the background no ideaSent from my LG-D852 using TapatalkIt happens when I run it in the background. It's just strange that it only occurs when using the plug-in.Sent from my XT1575 using Tapatalk Quote Link to comment
Squid Posted August 30, 2017 Author Share Posted August 30, 2017 23 minutes ago, osker246 said: It happens when I run it in the background. It's just strange that it only occurs when using the plug-in. Sent from my XT1575 using Tapatalk Are you using one of the built-in schedules or a custom cron? Quote Link to comment
osker246 Posted August 30, 2017 Share Posted August 30, 2017 2 minutes ago, Squid said: Are you using one of the built-in schedules or a custom cron? Custom cron. 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.