What are some scripts you would suggest to execute in fixed time periods?


dedq

Member
Local time
10:55 AM
Posts
56
Location
Serbia
OS
Windows 11
Hey!

I recently started using Task Scheduler to execute certain scripts in fixed time periods. I've started executing script to delete temporary files every minute and the ones that check system corruption every single day (sfw).

What would be some scripts you would recommend adding for overall performance of PC or some you would recommend in general?

Thank you for reading!
 

My Computer

System One

  • OS
    Windows 11

barman58

Moderator
Staff member
Local time
9:55 AM
Posts
1,277
OS
Windows 11 Pro x64 [Latest Release Preview]
I would not recommend that you add, remove or edit any scheduled tasks in Windows 11, this is a Dev Level pre-release version of the planned OS due for release at some time in the future,

It is likely that there are tasks scheduled to run by Microsoft to fix known problems, and removing these could cause a total system failure the same goes for any modification to the running tasks or addition of more

The basic adage of "If if Ain't broke Don't fix it" has to apply to any pre release software - and personally I would not consider any additional scheduled tasks to the OS without a known reason for it

Your task to delete temporary files every minute could cause a failure in some routine added to the system by Microsoft's developers to monitor a known fault or new feature
 

My Computers

System One System Two

  • OS
    Windows 11 Pro x64 [Latest Release Preview]
    Computer type
    PC/Desktop
    Manufacturer/Model
    Chillblast to my design
    CPU
    Ryzen 9 5950X, 4.9GHz
    Motherboard
    Asus Prime X570-Pro Motherboard
    Memory
    64GB DDR4 3200MHz
    Graphics Card(s)
    4GB NVIDIA GEFORCE GTX 1650 Ti - HDMI, DP
    Sound Card
    On motherboard Feeding SPDiF 5.1 system
    Monitor(s) Displays
    32" UHD 32 Bit HDR Monitor + 43" UHD 4K 32Bit HDR TV
    Screen Resolution
    2 x 3840 x 2160
    Hard Drives
    1TB M2 SSD OS, 500GB Fast Access SSD, 2 x 8TB Data + Various Externals from 1TB to 4TB, 10TB NAS
    PSU
    NZXT C750 80 PLUS Gold 750W Modular PSU
    Case
    Chillblast Silent Workstation PC Case - Black
    Cooling
    NZXT Kraken X63 280mm CPU Cooler, Quiet Case fans Fan
    Keyboard
    Wireless Logitec MX Keys + K830 [Depending on where I'm Sat]
    Mouse
    Wireless Logitec - MX Master 3S +
    Internet Speed
    72 MB Down 18.5 MB Up
    Browser
    Latest Chrome
    Antivirus
    BitDefender Total Security [Latest]
    Other Info
    Also run...
    Dell XPS 17 Laptop
    HP Laptop 8GB - Windows 10 Pro x64 HP 15.2"
    Nexus 7 Android tablet [x2]
    Samsung 10.2" tablet
    Blackview 10.2 Tablet
    Sony Z3 Android Smartphone
    Samsung S9 Plus Smartphone
    Wacom Pro Medium Pen Pad
    Wacom Pro Small Pen Pad
    Wacom ExpressKey Remote
    Loopdeck+ Graphics Controller
    Shuttle Pro v2 Control Pad
  • Operating System
    Windows 11 Pro x64 [Latest release]
    Computer type
    Laptop
    Manufacturer/Model
    Dell XPS 17 9700
    CPU
    i7 10750H
    Motherboard
    Stock
    Memory
    32 GB
    Graphics card(s)
    Stock Intel + GTX 1650 Ti
    Sound Card
    Stock 4 speaker
    Monitor(s) Displays
    Stock 17" + 32" 4K 3840 x 2160 HDR-10
    Screen Resolution
    3840 x 2400 HDR touchscreen
    Hard Drives
    2TB M2 NVMe
    PSU
    Stock
    Case
    Stock Aluminium / Carbon Fibre
    Cooling
    Stock + 2 fan cooling pad
    Mouse
    Stock Trackpad +Logi Mx Master 3 or MX Ergo Trackball
    Keyboard
    Stock Illuminated + Logi - MX Keys
    Internet Speed
    72 MB Down 18.5 MB Up
    Browser
    Latest Chrome
    Antivirus
    BitDefender Total Security 2021
    Other Info
    Also use an Adjustable Support for Laptop and Adjustable stand for monitor

abactuon

Well-known member
Member
VIP
Local time
4:55 PM
Posts
230
OS
Microsoft Windows 11 Home
for overall performance of PC
PS E:\Temp> winsat formal -v
PS E:\Temp> Get-CimInstance Win32_WinSAT


CPUScore : 8,9
D3DScore : 9,9
DiskScore : 8,85
GraphicsScore : 5,9
MemoryScore : 8,9
TimeTaken : MostRecentAssessment
WinSATAssessmentState : 1
WinSPRLevel : 5,9
PSComputerName :



PS E:\Temp>
 

My Computer

System One

  • OS
    Microsoft Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    ASUS TUF Dash F15 FX516PM_FX516PM
    CPU
    Intel Core i7-11370H
    Motherboard
    ASUS FX516PM
    Memory
    Micron 4ATF1G64HZ-3G2E2/8G + Patriot PSD416G320081S
    Graphics Card(s)
    NVIDIA GeForce RTX 3060 Laptop
    Sound Card
    Edifier 800BT Plus
    Monitor(s) Displays
    LM156LF-2F03
    Screen Resolution
    1920 x 1080
    Hard Drives
    1. PCIe Gen 4 KINGSTON SNV2S1000G
    2. PCIe Gen 3 SK Hynix HFM512GD3JX013N
    PSU
    200W
    Mouse
    Corsair KATAR PRO XT
    Internet Speed
    70 Mbps
    Browser
    Firefox
    Antivirus
    Microsoft Defender Antivirus

jbcarreon123

C:\> echo ^<jbcarreon123^>
Power User
VIP
Local time
5:55 PM
Posts
1,089
Location
Quezon City, Philippines
OS
Windows 11 [Insider (Enrolled using OfflineInsiderEnroll)], Linux Mint, Zorin OS
I would suggest an:
batch file that erases C:/Windows.old after an update​
batch file that chkdsk the C drive once in an month.​
batch file that shutdowns the PC in an specific time. Auto turn on is on the BIOS.​
batch file that runs V2 automatically after BSOD crash, and​
batch file that executes the needed programs after logon without Startup Impact.​

Also, I runs an CMD-based GUI Launcher, as batch files is 10x faster to run than conventional Executable files.
 
Last edited:

My Computer

System One

  • OS
    Windows 11 [Insider (Enrolled using OfflineInsiderEnroll)], Linux Mint, Zorin OS
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 270s
    CPU
    Core i3 2100 3.2Ghz
    Memory
    4gb DDR3-1333
    Graphics Card(s)
    iGPU
    Sound Card
    Realtek
    Monitor(s) Displays
    HP Compaq LA2006x
    Screen Resolution
    900p
    Hard Drives
    Patriot Burst 240GB SATA III SSD
    Internet Speed
    40MBit/s
    Browser
    Firefox [recently switched]
    Antivirus
    WD
    Other Info
    Second-hand PC,
    No TPM, having WDDM 1.2, unsupported CPU.
    Installed Windows 11 using the registry hack..
    Clean installed even Windows 10

BunnyJ

Python Programmer
Guru
VIP
Local time
4:55 AM
Posts
5,640
Location
USA TN
OS
Windows 11 Home - Dev Channel - 22H2
I would suggest an:
batch file that erases C:/Windows.old after an update​
batch file that chkdsk the C drive once in an month.​
batch file that shutdowns the PC in an specific time. Auto turn on is on the BIOS.​
batch file that runs V2 automatically after BSOD crash, and​
batch file that executes the needed programs after logon without Startup Impact.​

Also, I runs an CMD-based GUI Launcher, as batch files is 10x faster to run than conventional Executable files.
I tend to agree.. that makes a lot of sense to me.
Jeff
 

My Computer

System One

  • OS
    Windows 11 Home - Dev Channel - 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Banna Junior 7000 - X Series
    CPU
    Ryzen 7 2700X
    Motherboard
    Asus Crosshair VII Hero, X470
    Memory
    Gskill 32GB, 16GBX2 PC3000
    Graphics Card(s)
    GeForce GTX TITAN X 12GB
    Sound Card
    Realtek (R) Audio
    Monitor(s) Displays
    ASUS VP28UQG 28" 4K, Viotek 32" 1080p
    Screen Resolution
    4K 3840 x 2160
    Hard Drives
    Primary Samsung 256 SSD
    PSU
    EVGA BQ 700w 80+ Bronze
    Case
    NZXT 510
    Cooling
    AMD Wraith Prism LED
    Keyboard
    Corsair
    Mouse
    Amazon Generic with Cord
    Internet Speed
    Download: 350.50 mbps Upload: 12.02 mbps Ping: 15ms
    Browser
    Firefox, Chrome and Edge
    Antivirus
    MS - Defender

geneo

Well-known member
Power User
VIP
Local time
4:55 AM
Posts
2,229
OS
Windows 11 Pro x64
I run weekly and daily powershell scripts.. The daily wakes my computer from sleep @5am and puts it back to sleep when done. Weekly runs at 3am.

Daily:
Backup (robocopy) voltaile files (files that I may change daily or may be blown away by a image recovery - like some things in Program Data, new RAW photo images)
Run defender quick scan and Bootsector scan

Weekly:
robocopy volatile files to a weekly location
quick and boot sector scan
Scans on data disks an user disk
If I haven't done a Macrium Reflect image of the system disk in the last five days, performs a differential image backup
dism and sfc run
Optimize all disks (SSD trims)

I also have scripts I initiate by hand to run a robocopy backup of my data to two or more external disks (at a time).

Just a note - why so frequent cleaning of temporary files? Hope that is not system temp as they may be needed. General guidance and what Windows cleanup does is delete temp files that are over a week old. Start my system image backups by hand as I see needed and just use the windows disk disk settings to clean the files before the backup.
 
Last edited:

My Computers

System One System Two

  • OS
    Windows 11 Pro x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    DIY
    CPU
    10900K, 5.2 GHz (4.9 GHz uncore) all-core
    Motherboard
    Asus ROG Maximus Hero XIII Wifi
    Memory
    64GB (2x32) G.skill TridentZ RGB 4266 MHz CL18
    Graphics Card(s)
    Asus ROG Strix 2070 Super A8G
    Sound Card
    Onboard Audio, Vanatoo Transparent One; Klipsch R-12SWi Sub
    Monitor(s) Displays
    Eizo CG2730, ViewSonic VP2768
    Screen Resolution
    2560 x 1440p x 2
    Hard Drives
    WDC SN850 1TB (OS+), Samsung 980 1TB (games), Raid 0: 1TB 850 EVO + 1TB 860 EVO. Sabrent USB-C DS-SC5B docking station: 6TB WDC Black, 6TB Ironwolf Pro; 2x 2TB WDC Black
    PSU
    750W Seasonic Prime Ultra Titanium Plus
    Case
    Fractal Design Meshify 2 dark tint glass
    Cooling
    EK-AIO 360 D-RGB w/Phanteks T30-120 fans, Noctua NF-A14 Chromax case fan
    Keyboard
    Glorious GMMK TKL - Brown mechanical, lubed modded
    Mouse
    Logitech G305 wireless gaming
    Internet Speed
    350 Mb/s down, 12 Mb/s up
    Browser
    Firefox
    Antivirus
    Defender, Macrium Reflect 8 ;-)
    Other Info
    Logitech C920e Webcam (crap don't buy)
  • Operating System
    Mac OS
    Computer type
    Laptop
    Manufacturer/Model
    Apple 13" Macbook Pro 2020 (m1)
    CPU
    M1
    Monitor(s) Displays
    2560x1600

dedq

Member
Thread Starter
Local time
10:55 AM
Posts
56
Location
Serbia
OS
Windows 11
I run weekly and daily powershell scripts.. The daily wakes my computer from sleep @5am and puts it back to sleep when done. Weekly runs at 3am.

Daily:
Backup (robocopy) voltaile files (files that I may change daily or may be blown away by a image recovery - like some things in Program Data, new RAW photo images)
Run defender quick scan and Bootsector scan

Weekly:
robocopy volatile files to a weekly location
quick and boot sector scan
Scans on data disks an user disk
If I haven't done a Macrium Reflect image of the system disk in the last five days, performs a differential image backup
dism and sfc run
Optimize all disks (SSD trims)

I also have scripts I initiate by hand to run a robocopy backup of my data to two or more external disks (at a time).

Just a note - why so frequent cleaning of temporary files? Hope that is not system temp as they may be needed. General guidance and what Windows cleanup does is delete temp files that are over a week old. Start my system image backups by hand as I see needed and just use the windows disk disk settings to clean the files before the backup.
I don't really know about the theory behind deleting temporary files but my experience is that PC is at least 40% faster if those files are deleted often.
I had them deleted even more often to be honest.
It's all about practice and what I experience to be better.
 

My Computer

System One

  • OS
    Windows 11

Latest Support Threads

Top Bottom