If I have a multi-year task that still works when I need to leave, I just lock the screen using Windows-L and leave myself logged in. If this works, it is a much simpler solution than setting up a scheduled task each time you want to start a specific task, especially if you need to specify different parameters each time.
I understand that this may not always be possible - you may have corporate rules that prohibit this or may use a shared computer where the next person needs access to the console (although completing a scheduled task in the background certainly doesnβt make them more happy), but I propose this as a simple solution for most single-user computer scripts. IMO, scheduled tasks are best used only for scheduled tasks, i.e. What you want to automate to run on a regular basis. If this describes your scenario, be sure to use it. Similarly, if you really have a service that works constantly and answers requests, use the Windows service. If you just want your work to continue to work and protect your computer until it shuts down, then locking your computer is the best way to go usually.
source share