web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Shut down PC from Cale...
Power Automate
Unanswered

Shut down PC from Calendar Event

(0) ShareShare
ReportReport
Posted on by

Good Day everyone, 

 

I've been trying find an answer but haven't had luck yet. 

Here in South Africa we have a big issue with rolling blackouts (loadshedding), much to the detriment of my PC.

We have an app that integrates with your calendar to notify you when the power will be off. I would like to know if there is a way to build a flow that will pull the loadshedding event from the calendar, and then shut down the PC say 10 minutes before that time. 

I can't use the basic task scheduler to just turn it off at a set time during the day/night because the scheduled loadshedding times vary day to day.

 

TIA

Categories:
I have the same question (0)
  • mojawa870 Profile Picture
    2 on at

    Hi ],

    Thank you for bringing up this issue. It's indeed frustrating to deal with rolling blackouts, especially when they disrupt work and daily routines. Your idea of integrating the loadshedding schedule with your calendar to automate PC shutdown is quite practical.

    To achieve this, you can utilize scripting languages like Python or PowerShell to create a script that pulls the loadshedding events from your calendar and schedules the PC shutdown accordingly. You'll need to interface with the calendar API to fetch the events and then schedule the shutdown process.

    Here's a high-level approach you can take:

    1. Choose a scripting language: Decide whether you want to use Python, PowerShell, or any other language you're comfortable with for scripting.

    2. Access calendar events: Utilize the respective API for your calendar service (e.g., Google Calendar API, Outlook Calendar API) to retrieve upcoming loadshedding events.

    3. Parse event data: Extract relevant information such as event start time and duration from the retrieved events.

    4. Calculate shutdown time: Based on the loadshedding event start time, calculate the time to initiate the PC shutdown, considering your desired lead time (e.g., 10 minutes before the event).

    5. Schedule shutdown: Use system commands or libraries in your chosen scripting language to schedule the PC shutdown at the calculated time.

    6. Test and refine: Test your script thoroughly to ensure it works as expected. Make adjustments as necessary based on testing results.

    Remember to handle potential error cases gracefully, such as network issues or unexpected calendar data formats.

    If you need further assistance with specific steps or code examples, feel free to ask. We're here to help you navigate through this challenge.

    Best regards,
    Michael 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard