PowerShell Core 6.0 and Raspberry Pi

You may also like...

4 Responses

  1. Philip Ries says:

    Install link is broken

  2. NightHunter says:

    And wouldn’t it be easier to run the script every first day of the month a minute after midnight (it’s possible to write in cron 1 0 1 * *)? The script will not run 30 times a month unnecessarily and it will be faster if you do not have to use the complex function to find out the last day of the month. In addition, data for the last minute of the month will no longer be missing.

  3. NightHunter says:

    And wouldn’t it be easier to run the script every first day of the month a minute after midnight (it’s possible to write in cron 1 0 1 * *)? The script will not run 30 times a month unnecessarily and it will be faster if you do not have to use the complex function to find out the last day of the month. In addition, data for the last minute of the month will no longer be missing.

    And the function is really bad – what about December? [int](12 + 1)?
    When you add the months, please: (Get-Date -Day 1).AddMonths (1)

    Or isn’t this easier?
    $today = Get-Date
    $lastDay = [DateTime] :: DaysInMonth ($today.Year, $today.Month)

  4. Lewis says:

    @NightHunter – thanks for the critique. I’m not going to suggest for a minute that every script I produce is a production ready masterpiece without any bugs, but then, neither is anyone else’s code – even as simple as this error might be. That said, the point of this article wasn’t to demonstrate the script, merely how to run them on a Raspberry Pi…since the concept was very new when I wrote this article 2 years ago.

Leave a Reply

Your email address will not be published. Required fields are marked *