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


dedq

Well-known member
Local time
7:10 PM
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 My Computer

At a glance

Windows 11AMD Athlon X4 860K8 gigabytes DDR3AMD Radeon R7200 Series
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 My Computers

  • At a glance

    Windows 11 Pro x64 [Latest Release Preview] [...AMD RYZEN 9 7950X OEM64GB [2x32GB Corsair Vengeance 560 AMD DDR5]3XS* ASUS DUAL RTX 4060 OC 8G
    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
  • At a glance

    Windows 11 Pro x64 [Latest release]i7 10750H32 GBStock Intel + GTX 1650 Ti
    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
    Keyboard
    Stock Illuminated + Logi - MX Keys
    Mouse
    Stock Trackpad +Logi Mx Master 3 or MX Ergo Trackball
    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 My Computer

At a glance

Microsoft Windows 11 HomeIntel Core i5-13490F2 x 16 Patriot Memory (PDP Systems) PSD516G56...GIGABYTE GeForce RTX 4070 WINDFORCE OC 12G (G...
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 6400MT (32-37-37-74); 1.35V)
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 Computers My Computers

  • At a glance

    Windows 11 HomeCore i5-12450HX20GB DDR5-4800iGPU + RTX 3050 Mobile (6GB)
    OS
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo
    CPU
    Core i5-12450HX
    Memory
    20GB DDR5-4800
    Graphics Card(s)
    iGPU + RTX 3050 Mobile (6GB)
    Sound Card
    Realtek
    Monitor(s) Displays
    the built-in laptop screen, and a generic monitor
    Screen Resolution
    1080p * 2
    Hard Drives
    GIGABYTE NVMe SSD 256GB (GP-GSM2NE3256GNTD)
    Micron NVMe SSD 512GB (MTFDKCD512QFM-1BDIAABLA)
    Browser
    Firefox
    Antivirus
    WD
  • At a glance

    Windows 10 ProCore i3-21004GB DDR3-2133iGPU
    Operating System
    Windows 10 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell
    CPU
    Core i3-2100
    Memory
    4GB DDR3-2133
    Graphics card(s)
    iGPU
    Screen Resolution
    1080p
    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 My Computer

At a glance

Windows 11 Home(Beta) - 25H2 -26220.9223AMD Ryzen 5 5600GG.SKILL Ripjaws V Series 64GB 4x16Nvidia geforce gtx titan x
OS
Windows 11 Home(Beta) - 25H2 -26220.9223
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
Monitor(s) Displays
28" ASUS VP28U 4k
Screen Resolution
4K
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 My Computers

  • At a glance

    Windows 11 ProIntel Core i9 14900K 5800/4500 P/E96GB (2x48) G.skill Ripjaws 6800Asus ROG Strix 4070 Ti OC
    OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    DIY Photoshop/Audio/Game/tinker
    CPU
    Intel Core i9 14900K 5800/4500 P/E
    Motherboard
    Asus ROG Maximus Z790 Dark Hero
    Memory
    96GB (2x48) G.skill Ripjaws 6800
    Graphics Card(s)
    Asus ROG Strix 4070 Ti OC
    Sound Card
    B&W 606 S3 speakers; Audiolabs 7000a integrated amp; RSL 10S Mk2 sub
    Monitor(s) Displays
    Eizo CG2730 ColorEdge, ViewSonic VP2768
    Screen Resolution
    2560 x 1440 x 2
    Hard Drives
    nvme: WDC SN850X 4TB, SN850 1TB, SK-Hynix 2 TB P41
    Spinners: 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
    FD North XL Mesh, Black Walnut
    Cooling
    EK Nucleus black 360 AIO w/Phanteks T30 fans; 2 Noctua NF-A14 Chromax ; T30 for memory
    Keyboard
    Keychron Q3 Max TKL w/GMK Redsuns Red Samuri keycaps
    Mouse
    Logitech G305 wireless gaming
    Internet Speed
    575 Mb/s down | 25 Mb/s up
    Browser
    Firefox
    Antivirus
    Defender, Macrium Reflect X
    Other Info
    Phangkey Amaterasu V2 Desk Mat
  • At a glance

    Apple M1
    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 My Computer

At a glance

Windows 11AMD Athlon X4 860K8 gigabytes DDR3AMD Radeon R7200 Series
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 Support Threads

Back
Top Bottom