Skip to content
Menu
myCloud myCloud

Personal short notes about Cloud

  • XMPie
  • AWS
    • AWS Topics
    • AWS Architecture
    • AWS CLI
    • AWS Health
    • AWS Policies
    • AWS Cost
  • CHEAT SHEETS
myCloud myCloud

Personal short notes about Cloud

Windows – Task scheduler

By mikado on October 17, 2022October 17, 2022

Manual

  • Open Administrative tools / Task Scheduler or run taskschd.msc
  • Under Task Scheduler Library, create a new Folder MIKADO
  • Create folder C:\Scripts and copy powershell.exe from C:\Windows\System32\WindowsPowerShell\v1.0
  • Create the powershell file we will run: CleanTempFolder.ps1
    • Set-Location “C:\Windows\Temp”
    • Remove-Item * -recurse -force
  • Create a Basic Task
    • Name: myTask
    • Trigger: Daily and select time and recurrence
    • Action: Start a program
    • Program/script: C:\Scripts\powershell.exe
    • Add Arguments: -Command “. ‘C:\Scripts\CleanTempFolder.ps1’ “
  • Set the schedule with:
    • Run whether user is logged on or not
    • Run with highest privileges

Category: Microsoft

Categories

  • AWS (4)
  • AWS Architecture (8)
  • AWS CLI (5)
  • AWS Cost (3)
  • AWS Health (4)
  • AWS Policies (2)
  • AWS Topics (24)
  • CHEAT SHEETS (16)
  • Container (21)
  • Datadog (4)
  • Jenkins (2)
  • Linux (9)
  • Microsoft (7)
  • Python (1)
  • SCRIPTS (9)
  • Terraform (5)
  • XMPie (6)
©2025 myCloud
Click to Copy