Trigger windows Task Scheduler proccess few times a day between certain hours - windows

im trying to achieve something but i dont really know how
I have set a new basic task in windows task scheduler and on the advanced settings im trying to set something specific.
I want my job to run between 7:00-23:59 every 3 hours
In other words, i dont want the job to run at night..
(I tried using the expire checkbox but i am not doing things right)
edited: i use Windows Server 2008 standard
Any help would be great..

Open the advanced properties for the task. Select the Triggers tab. Edit the trigger. Change the schedule to start at 07:00 and repeat the task every 3 hours for 17 hours (you have to type those figures in yourself).

Related

Task scheduler runs console app task only for the first time

I created console app in .Net technology. App works fine when I trigger it by click on exe setup (console shows up for about 5-6 min and that's how it should work), so I put it into Task Scheduler(Windows Server 2022) as a Task with settings:
1.General: Administrator, Run only when user is logged on.
2.Triggers: one time at xxx after trigerred repeat every 15 min, enabled.
3.Actions: Start a program with start in optional parameter (where exe file is).
4.Conditions: none checked.
5.Settings: allow on demand, do not start a new instance.
When I run it from windows explorer task runs properly for the first time. On the next start it stops running. Nothing happens. No errors/unusual results in history. Status changes to Running for 2-3 sec and get back to Ready. if I run it again from the explorer level, task runs properly again, but only for the first time.
What I've tried:
1.Change user (system, local service, network service, administrator).
2.Run logged in and not logged in.
3.Highest priviliges on/off.
4.Every kind of trigger time option.
5.With and without optional start in.
6.Different locations(desktop, C:/, other).
7.Run as Admin in .exe properties.
8.Every checkbox on/off in settings.
Anyone faced this issue? Thanks in advance.

Windows 10 Task Scheduler tasks don't even try to run

I am trying to get a task in windows scheduler to run every 10 mins.
In the following image there are two blue lines, this is only one task but I have screenshot them at different times after refreshing the page.
As you can see in the image Task Scheduler, on the bottom blue line under last run time it says 3:37pm and next run time is 5:02pm. then on the top blue line I have a screenshot the same task after 5:02pm, it hasn't updated the last run time but it has pushed the next run time forward 10 mins.
If I right mouse click on the task and manually run it, it works. Its just the timer functionality of task scheduler that isn't working, I'm guessing i have misconfigured it somehow.
These are the options I have set, everything else is on it's default value.
Trigger
Daily
Recur every 1 day
Start today
Repeat task every 10 mins
for a duration of indefinitely
Expire tomorrow
Enabled
Conditions
Do not Start task only on AC
Wake the computer to start the task
Settings
Run task as soon as possible after scheduled start is missed
My question, What do I need to change to make this actually run every 10 mins.
Evidence of me searching before posting.
Task Scheduler Not Running Batch File I don't use a start path.
Batch file runs manually but not through Windows 10 Task Scheduler I'm not running over the network but I did elevate privs, even though my program doesn't write any files.
Running PowerShell in Task Scheduler Doesn't mention timer functionality only action functionality.
Task Scheduler failed to start. Additional Data: Error Value: 2147943726 I'm not trying to run while I'm logged out and I'm not getting this error message.
I found that when I changed the 'interval' from 'indefinitely' to '1 day', it started to works

Returning and reporting on multiple return codes in SCCM package

I have a utility that detects pending restarts and prompts the user to restart. It also forces a restart on Sunday at 2AM if needed. I'd like to be able to report on who did what:
Ignored restart prompt (automatically goes away after 2 hours)
Clicked the "Later" button
Clicked the "Restart now" button
Computer Auto-restarted
I can send the different return codes from my Powershell script, but I don't know how I would setup the package to accept multiple return codes and report on it. I've found some documentation on MIF files, but it all seems to apply to older versions of SCCM - I'm running ConfigMgr 1910 and I'm good at SQL reporting, just need to get the data into a table somewhere.
Maybe this git project can help you to send the information via custom status messages:
https://github.com/MattiasC85/Send-CMMessage

2016 Task Scheduler Only Runs the first action in the list

I have a simple Task Schedule job that runs a program 6 times, sending to it a different Argument each time.
This has been working well for some years, but on 2016 Server it only runs the first action and then it stops.
Any ideas of a fix? I have looked on google for all fixes etc, but they haven't worked and seem to be for 2017 and back
Based on my past experience, this behavior could caused by one of the following:
If your task targets a batch file of an executable file, try to check Windows Task Manager for that file running under "Processes" tab. Select each of your target batch/exe then End Process button. This may have caused by a seemed-to-stuck process but still on "Running" status.
On Task Scheduler, check for your task's "Last Run Result". This could be having code other than 0x0 (which is the successful run). If so, check for details under "History" tab below this pane.

VB.Net - Reminder - Startup

I have designed an application and I want this to run When ever I turn on my lap on and should execute some reminders which I have configured. I also need a "Snooze" and "Completed" button on the reminder. I want it to remind me for every 1 hour till I click "Finish" Button on the reminder.
Use Task Scheduler Service to schedule tasks.
For Visual Basic 6 you should use Task Scheduler Scripting Objects:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383607(v=vs.85).aspx

Resources