Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6c62e29

Browse files
author
mfsoftworks
committed
[boot] added windows auto-start scripts
1 parent baa987c commit 6c62e29

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

‎README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,28 @@ Install Python.
6666

6767
If any library is missing do `pip install` *library*.
6868

69-
Create a cron job to run the script on every boot.
69+
To test the script output run with `python3 monitor.py`.
7070

71-
To test the script output run with `python3 monitor.py` or to run in background use `pythonw monitor.py` for PC and `python3 monitor.py &` for Linux.
71+
### Linux Autostart
7272

73-
### Creating Cron Job
73+
Create a cron job to run the script on every boot.
7474

7575
Edit cron with `crontab -e`.
7676

7777
Add the script at the bottom of the cron list as `@reboot python3 /path/to/script/monitor.py &`.
7878

79+
### Windows Autostart
80+
81+
`Windows/monitor.bat` and `Windows/monitor.vbs` scripts are included.
82+
83+
`monitor.bat` will call python to launch `monitor.py`.
84+
85+
`monitor.vbs` silently calls `monitor.bat` to run in the background.
86+
87+
To create an autostart for Windows open the startup folder with keyboard `Windows + R`, enter `shell:startup` and create a shortcut here to `monitor.vbs`.
88+
89+
This will run the script in the background on every boot.
90+
7991
## Author
8092

8193
MF Softworks <mf@nygmarosebeauty.com>

‎Windows/monitor.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python ../monitor.py

‎Windows/monitor.vbs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Dim WinScriptHost
2+
Set WinScriptHost = CreateObject("WScript.Shell")
3+
WinScriptHost.Run Chr(34) & "monitor.bat" & Chr(34), 0
4+
Set WinScriptHost = Nothing
5+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /