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

dedq

Member
Local time
9:48 PM
Posts
18
Location
Serbia
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

  • Operating System
    Windows 11

barman58

Moderator
Staff member
Local time
8:48 PM
Posts
586
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

  • Operating System
    Windows 10 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 3 + M570 Trackball
    Internet Speed
    72 MB Down 18.5 MB Up
    Browser
    Latest Chrome
    Antivirus
    BitDefender Total Security 2021
    Other Info
    Also run...
    Laptop - Quad 8GB - Windows 10 Pro x64 HP 15.2"
    Nexus 7 Android tablet
    Samsung 10.2" tablet
    Sony Z3 Android Smartphone
    Samsung S9 Plus Smartphone
    Samsung Note S20
    Wacom Pro Medium Pen Pad
    Wacom Pro Small Pen Pad
    Wacom ExpressKey Remote
    Loopdeck+ Graphics Controller
    Shuttle Pro v2 Control Pad
  • Operating System
    Windows 10 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"
    Screen Resolution
    3840 x 2160 HDR touchscreen
    Hard Drives
    2TB M2
    PSU
    Stock
    Case
    Stock Aluminium / Carbon Fibre
    Cooling
    Stock + 2 fan cooling pad
    Mouse
    Stock Trackpad
    Keyboard
    Stock Illuminated
    Internet Speed
    72 MB Down 18.5 MB Up
    Browser
    Latest Chrome
    Antivirus
    BitDefender Total Security 2021

abactuon

Active member
Member
Local time
2:48 AM
Posts
117
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

  • Operating System
    Microsoft Windows 10 Home (x64)
    Computer type
    Laptop
    Manufacturer/Model
    MSI GF65 Thin 9SD
    CPU
    Intel Core i5-9300H
    Motherboard
    MSI MS-16W1
    Memory
    2 x Kingston KHX2666C15S4/16G
    Graphics Card(s)
    GeForce GTX 1660 Ti
    Sound Card
    Intel Cannon Lake-H/S - cAVS
    Monitor(s) Displays
    AU Optronics B156HAN13.0
    Screen Resolution
    1920 x 1080
    Hard Drives
    1. Noname 128GB SSD
    2. SAMSUNG MZVLB512HAJQ
    PSU
    180W
    Mouse
    HP USB Fingerprint Mouse
    Internet Speed
    50 Mbps
    Browser
    Firefox

jbcarreon123

C:\>sudo apt install chrome
Member
VIP
Local time
3:48 AM
Posts
681
Location
Quezon City, Philippines
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

  • Operating System
    Windows 10, Windows 10 Ghost Spectre, Windows 11 (multi-boot)
    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
    Internet Speed
    10MBit/s
    Browser
    Chrome, FFox and my homemade browser IE11-based
    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
Power User
VIP
Local time
3:48 PM
Posts
2,728
Location
Oak Ridge, TN(The Secret City)
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

  • Operating System
    Windows 11 Home
    Computer type
    PC/Desktop
    Manufacturer/Model
    Banna Junior 7K - 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
    Viotek 32" Curved, ViewSonic 27"
    Screen Resolution
    1080P
    Hard Drives
    Primary Samsung 256 SSD
    PSU
    EVGA BQ 700w 80+ Bronze
    Case
    NZXT 510
    Cooling
    Stock AMD cooler
    Keyboard
    Corsair
    Mouse
    Amazon Generic with Cord
    Internet Speed
    Download: 240.78 mbps Upload: 12.02 mbps Ping: 15ms
    Browser
    Firefox and Edge
    Antivirus
    Defender

geneo

You've got to pick up every stitch
Power User
VIP
Local time
3:48 PM
Posts
715
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

  • Operating System
    Windows 11 Pro x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    DIY
    CPU
    10900KF, 5.1 GHz delid
    Motherboard
    Asus Maximus Hero XII Wifi
    Memory
    64GB G.skill TridentZ RGB 3200CL14 B-die @ 3600 CL16
    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
    Samsung 960 Pro 512 GB (OS), Samsung 980 1TB, Raid 0: 1TB 850 EVO + 1TB 860 EVO. Sabrent USB-C DS-SC5B docking station: 6TB WDC Black, 6TB Ironwolf Pro; 2TB WDC Black
    PSU
    750W Seasonic Prime Ultra Titanium
    Case
    Fractal Design Meshify 2
    Cooling
    EK-AIO 360 D-RGB w/Phanteks 120 T30 fans, 2x Noctua NF-A14 Chromax case
    Keyboard
    Glorious GMMK TKL - Brown mechanical
    Mouse
    Logitech G305 wireless gaming
    Internet Speed
    120 Mb/s down, 12 Mb/s up
    Browser
    Firefox
    Antivirus
    Defender, Macrium Reflect 8 ;-)
    Other Info
    Logitech C920e Webcam
  • Operating System
    Mac OS Big Sur
    Computer type
    Laptop
    Manufacturer/Model
    Apple 13" Macbook Pro 2020 (m1)
    CPU
    M1
    Monitor(s) Displays
    2560x1600

dedq

Member
Thread Starter
Local time
9:48 PM
Posts
18
Location
Serbia
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

  • Operating System
    Windows 11
Top Bottom