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


dedq

Well-known member
Local time
10:53 AM
Posts
61
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
    Computer type
    PC/Desktop
    CPU
    AMD Athlon X4 860K
    Motherboard
    Gigabyte F2A58M-S1
    Memory
    8 gigabytes DDR3
    Graphics Card(s)
    AMD Radeon R7200 Series
    Hard Drives
    SSD.
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] [Win11 PRO HighEnd MUP-00005 DD]
    Computer type
    PC/Desktop
    Manufacturer/Model
    Scan 3XS to my design
    CPU
    AMD RYZEN 9 7950X OEM
    Motherboard
    *3XS*ASUS TUF B650 PLUS WIFI
    Memory
    64GB [2x32GB Corsair Vengeance 560 AMD DDR5]
    Graphics Card(s)
    3XS* ASUS DUAL RTX 4060 OC 8G
    Sound Card
    On motherboard Feeding SPDiF 5.1 system [plus local sound to each monitor]
    Monitor(s) Displays
    32" UHD 32 Bit HDR Monitor + 43" UHD 4K 32Bit HDR TV
    Screen Resolution
    2 x 3840 x 2160
    Hard Drives
    3XS Samsung 980Pro 2TB M.2 PCIe4 4 x 8TB Data + Various Externals from 1TB to 8TB, 10TB NAS
    PSU
    3XS Corsair RM850x 850w Fully Modular
    Case
    FDesign Define 7 XL BK TGL Case - Black
    Cooling
    3XS iCUE H150i ELITE Liquid Cool, Quiet Case fans
    Keyboard
    Wireless Logitec MX Keys + K830 [Depending on where I'm Sat]
    Mouse
    Wireless Logitec - MX Master 3S +
    Internet Speed
    950 MB Down 55 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
    950 MB Down 55 MB Up
    Browser
    Latest Chrome
    Antivirus
    BitDefender Total Security 2021
    Other Info
    Also use an Adjustable Support for Laptop and Adjustable stand for monitor
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
    PC/Desktop
    Manufacturer/Model
    MSI MS-7D98
    CPU
    Intel Core i5-13490F
    Motherboard
    MSI B760 GAMING PLUS WIFI
    Memory
    2 x 16 Patriot Memory (PDP Systems) PSD516G560081
    Graphics Card(s)
    GIGABYTE GeForce RTX 4070 WINDFORCE OC 12G (GV-N4070WF3OC-12GD)
    Sound Card
    Bluetooth Аудио
    Monitor(s) Displays
    INNOCN 15K1F
    Screen Resolution
    1920 x 1080
    Hard Drives
    WD_BLACK SN770 250GB
    KINGSTON SNV2S1000G (ELFK0S.6)
    PSU
    Thermaltake Toughpower GF3 1000W
    Case
    CG560 - DeepCool
    Cooling
    ID-COOLING SE-224-XTS / 2 x 140Mm Fan - rear and top; 3 x 120Mm - front
    Keyboard
    Corsair K70 RGB TKL
    Mouse
    Corsair KATAR PRO XT
    Internet Speed
    100 Mbps
    Browser
    Firefox
    Antivirus
    Microsoft Defender Antivirus
    Other Info
    https://www.userbenchmark.com/UserRun/66553205
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
    EndeavourOS, Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    custom PC
    CPU
    Core i5 8400
    Motherboard
    Gigabyte B360M-HD3
    Memory
    8gb DDR4-2400
    Graphics Card(s)
    iGPU
    Sound Card
    Realtek
    Monitor(s) Displays
    some generic 1080p 75hz monitor * 2
    Screen Resolution
    1080p * 2
    Hard Drives
    GIGABYTE NVMe SSD 256GB (GP-GSM2NE3256GNTD)
    Internet Speed
    200MBit/s
    Antivirus
    WD
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(Beta) - 23H2 - 22635.3209
    Computer type
    PC/Desktop
    Manufacturer/Model
    Banana Junior 5600- G Series
    CPU
    AMD Ryzen 5 5600G
    Motherboard
    Asus ROG Strix B550-F
    Memory
    G.SKILL Ripjaws V Series 64GB 4x16
    Graphics Card(s)
    NVIDIA GeForce GTX TITAN X
    Sound Card
    ASUS XONAR SE
    Monitor(s) Displays
    Viotek 32", 28" ASUS VP28U
    Screen Resolution
    1080p
    Hard Drives
    Primary SAMSUNG 970 EVO Plus
    PSU
    EVGA BQ 700w 80+ Bronze
    Case
    Zalman i3 NEO
    Cooling
    ARCTIC Freezer 7 X
    Keyboard
    Corsair
    Mouse
    Amazon Generic with Cord
    Internet Speed
    Download: 295.11 mbps Upload: 65.35 mbps T-Mobile Internet
    Browser
    Firefox and Edge
    Antivirus
    MS - Defender
    Other Info
    Speakers: Klipsch ProMedia 2.1
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 Photoshop/Game/tinker build
    CPU
    10900K, 5.2 GHz all cores
    Motherboard
    Asus ROG Maximus Hero XIII Wifi
    Memory
    64GB (2x32) G.skill TridentZ RGB 4266 MHz (Hynix) @ 18-24-24-42
    Graphics Card(s)
    Asus ROG Strix 4070 Ti OC
    Sound Card
    Onboard Audio, Vanatoo Transparent One; Klipsch R-12SWi Sub; Creative Pebble Pro Minimilist
    Monitor(s) Displays
    Eizo CG2730, ViewSonic VP2768
    Screen Resolution
    2560 x 1440p x 2
    Hard Drives
    WDC SN850 1TB nvme, SK-Hynix 2 TB P41 nvme, Raid 0: 1TB 850 EVO + 1TB 860 EVO SSD. Sabrent USB-C DS-SC5B 5-bay docking station: 6TB WDC Black, 6TB Ironwolf Pro; 2x 2TB WDC Black
    PSU
    850W Seasonic Vertex PX-850
    Case
    Fractal Design Meshify 2 dark tint glass
    Cooling
    EKWB 360 Nucleus Dark AIO w/Phanteks T30-120 fans, 1 Noctua NF-A14 Chromax case fan
    Keyboard
    Glorious GMMK TKL mechanical, lubed modded
    Mouse
    Logitech G305 wireless gaming
    Internet Speed
    380 Mb/s down, 12 Mb/s up
    Browser
    Firefox
    Antivirus
    Defender, Macrium Reflect 8 ;-)
  • Operating System
    Mac OS
    Computer type
    Laptop
    Manufacturer/Model
    Apple 13" Macbook Pro 2020 (m1)
    CPU
    Apple M1
    Screen Resolution
    2560x1600
    Browser
    Firefox
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
    Computer type
    PC/Desktop
    CPU
    AMD Athlon X4 860K
    Motherboard
    Gigabyte F2A58M-S1
    Memory
    8 gigabytes DDR3
    Graphics Card(s)
    AMD Radeon R7200 Series
    Hard Drives
    SSD.

Latest Tutorials

Back
Top Bottom