diff options
author | Charadon <dev@iotib.net> | 2022-10-08 22:24:30 -0400 |
---|---|---|
committer | Charadon <dev@iotib.net> | 2022-10-08 22:24:30 -0400 |
commit | 108f85d3d6bb3fb08ea68d410749aca5275c9a4f (patch) | |
tree | 6bf293900d857f93538d1827e91bc1e24d98eee6 | |
parent | 7013bbd6e8d0c81c6b0d4ccc3ba12afa1341ad63 (diff) | |
download | dscip-108f85d3d6bb3fb08ea68d410749aca5275c9a4f.tar.gz |
dscip.info: Updated 0.9.7
-rw-r--r-- | dscip.info | 114 |
1 files changed, 68 insertions, 46 deletions
diff --git a/dscip.info b/dscip.info index 55bccb9..b0b5555 100644 --- a/dscip.info +++ b/dscip.info @@ -236,6 +236,7 @@ dedicated section. * MSYS2 (Recommended):: * Only Bash:: +* Task Scheduler:: File: dscip.info, Node: MSYS2 (Recommended), Next: Only Bash, Up: Windows @@ -247,24 +248,12 @@ File: dscip.info, Node: MSYS2 (Recommended), Next: Only Bash, Up: Windows recommend using Scoop (https://scoop.sh). 2. Once MSYS2 is installed, run setup.sh ('setup.sh -h' for more info.). - 3. Next, we'll need to set it up as a service since Windows doesn't - really have cronjobs. I recommend using NSSM (https://nssm.cc) to - create a service for Windows. - 4. Edit config.sh and set 'DSCIP_DAEMON' to true, and set - 'DSCIP_DAEMON_FORK' to false. - 5. Next, create a batch/powershell script to launch MSYS2 to run the - dscip script. Here's an example batch script: - set MSYSTEM=MINGW64 - "C:\Users\builder.DESKTOP-U8KQJI1\scoop\apps\msys2\current\usr\bin\bash" -l -c "path/to/dscip" - 6. Next, run 'nssm install <name of service>' and set follow it's - instructions. You can also use sc.exe - (https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/sc-create) - if you'd rather not use NSSM. - 7. Then you just open services.msc and run it, or use 'nssm start - name-of-service', if you went with NSSM. + 3. Now we'll need a way to run it regularly. I recommend using the + Task Scheduler that comes with Windows. Here's a step-by-step + guide: *Note Task Scheduler:: -File: dscip.info, Node: Only Bash, Prev: MSYS2 (Recommended), Up: Windows +File: dscip.info, Node: Only Bash, Next: Task Scheduler, Prev: MSYS2 (Recommended), Up: Windows 1.3.2 Bash ---------- @@ -276,18 +265,49 @@ assuming that path. 2. Once Git is installed, you should be able to run 'bash' from the command prompt or powershell. Once in Bash, run setup.sh ('setup.sh -h' for more info.) and install dscip. - 3. Once installed, you'll need to set up a service for it. I - recommend using NSSM (https://nssm.cc) for an easier time. - 4. Open config.sh and change 'DSCIP_DAEMON' to true, and set - 'DSCIP_DAEMON_FORK' to false. - 5. Create a Batch or Powershell script, here's an example batch - script: - bash "C:\path\to\dscip" - 6. Once the script is done being made, you can use NSSM to create the - service, or sc.exe - (https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/sc-create). - 7. Now just open services.msc or 'nssm start <name-of-service>' to - start it. + 3. Now we'll need a way to run it regularly. I recommend using Task + Scheduler that comes with Windows. Here's a step-by-step guide: + *Note Task Scheduler:: + + +File: dscip.info, Node: Task Scheduler, Prev: Only Bash, Up: Windows + +1.3.3 Using Task Scheduler +-------------------------- + +Once you have DSCIP installed, you'll need to have it run on a regular +basis. For this, Windows has the Task Scheduler. Using it is very +simple, and i'll go over a basic set up with it. Also, you should +always use an unpriviledged user. + 1. Create a batch/powershell script that runs bash on the DSCIP + script. This script should be located somewhere that the + unpriviledged user can run it. + Here is an a batch example: + set MSYSTEM=MINGW64 :: If you're using MSYS2 + C:\Users\Build\scoop\apps\msys2\current\usr\bin\bash -l -c "/home/Build/project/dscip" + 2. Log in as an Administrator user and open Task Scheduler by press + Win+R, and typing taskschd.msc into the Run Dialog. + 3. Right click on 'Task Scheduler Library' and click 'Create Task' + 4. Under Security Options, change the User to an unpriviledged user, + and set to 'Run whether user is logged on or not.' + 5. Go to 'Triggers' and click the 'New...' button. A new window will + pop up with options to schedule when the task will execute. First + thing you should do is click the 'Begin the Task' drop-down menu + and select 'At startup', this will ensure that the task will run + with every reboot. As for schedule settings, I recommend going + down to advanced and checking the box 'Repeat task every:' and + putting in '1 minute' into the box, and then selecting + 'Indenfinitely' in the 'for a duration of' box. Now click the 'OK' + button to save your settings. + 6. Go to the 'Actions' tab and click the 'New...' button at the + bottom. In the 'New Action' dialog that will pop up, select the + Batch/Powershell script you made earlier. There's no need to + select a 'Start In' location, as the script by default tries to + change directory into the directory where the script is stored at. + 7. From here, you can configure any options you want, but if you have + no further configuration needs, click the 'Ok' button to close out + of the 'Create Task' window. Now just reboot the machine. +And that should be it, it will now run DSCIP every minute. File: dscip.info, Node: Packaging, Next: Using Templates, Prev: Windows, Up: Installing @@ -889,6 +909,7 @@ Index * Using: Scripts: Scripts. (line 6) * Windows: Installing on MSYS2: MSYS2 (Recommended). (line 6) * Windows: Installing with only Bash: Only Bash. (line 6) +* Windows: Using Task Scheduler: Task Scheduler. (line 6) @@ -900,24 +921,25 @@ Node: Unix8481 Node: As a Package8864 Node: Manually9325 Node: Windows9712 -Node: MSYS2 (Recommended)9953 -Node: Only Bash11175 -Node: Packaging12287 -Node: Using Templates13666 -Node: Using14265 -Node: Scripts14475 -Node: config_dot_sh14780 -Node: setup_dot_sh16776 -Node: update_dot_sh17534 -Node: pre_dot_sh17795 -Node: build_dot_sh18884 -Node: failed_dot_sh19434 -Node: post_dot_sh20138 -Node: Basic Variables21163 -Node: Advanced Variables23743 -Node: Quirks25181 -Node: Manual's License25376 -Node: Index32548 +Node: MSYS2 (Recommended)9972 +Node: Only Bash10478 +Node: Task Scheduler11161 +Node: Packaging13407 +Node: Using Templates14786 +Node: Using15385 +Node: Scripts15595 +Node: config_dot_sh15900 +Node: setup_dot_sh17896 +Node: update_dot_sh18654 +Node: pre_dot_sh18915 +Node: build_dot_sh20004 +Node: failed_dot_sh20554 +Node: post_dot_sh21258 +Node: Basic Variables22283 +Node: Advanced Variables24863 +Node: Quirks26301 +Node: Manual's License26496 +Node: Index33668 End Tag Table |