- #Github script record internet uptime update#
- #Github script record internet uptime code#
- #Github script record internet uptime windows#
Create a Task In General, check 'Run with highest privileges' Set Trigger as 'On workstation unlock' Set Action as 'Start a Program' with Program/Script'C:\Python27\python.exe' and Argument'C:\Python27 tpupdatetime.
#Github script record internet uptime windows#
The file must contain the list of websites, with http or https prefix. Use Windows Task Scheduler to schedule the python script to run on every startup.
The file path must match application settings path. Input: there is a text file with one host for each row. To test it manually, however, you can invoke the scheduled task using the Start-ScheduledTask cmdlet, as shown below. Application settings: this can be edited inside the main application script or using external script. Click the Start button and the Google sheet will start monitoring. Enter the Google Analytics Id (e.g., UA-123456-78) and the site monitor will log downtime / uptime events in your Analytics account.
You can put multiple addresses separated by commas. Running manually ^Īt this point, the scheduled task will execute every day at 3AM. Specify your website URL and the email address where you wish to be notified. You should now be returned a scheduled task object.
#Github script record internet uptime update#
sudo apt-get update sudo apt-get upgrade Copy. We can update the Raspberry Pi by running the following two commands within the terminal. But maybe that's better now I also found this random gist that, while tedious, makes it look like it's possible. PS51> $response = Invoke-WebRequest -Uri -UseBasicParsingĪt this point, you can build an up/down scenario with 200 being "up" and not 200 being "down." if ($response.StatusCode -ne 200) Before we get started with setting up the Raspberry Pi to monitor the internet’s speed, we must first make sure our Raspberry Pi is up to date. Anyone tried using the Github Packages feature for PowerShell stuff When I last looked, I recall there were issues because Github only supported nuget v3 and the PackageManagement module didn't support it yet.
#Github script record internet uptime code#
Once you know the port is open, you can test the HTTP status code using Invoke-WebRequest. The basic ideology of this script is to give real-time information about if the system the script is being run on is connected to an internet connection or not, and save that information into a log file simultaneously, keeping records of when the system was connected to the internet when it was disconnected and the time duration it was disconnected for.