							 WPTASKS 
							README.TXT 

					v1.0 26/05/2020 by Andy Bruin

Name: WpTasks.exe

Synopsis: List or delete WpTaskScheduler background task schedules.

Usage:

	Usage: WpTasks [/?][/v][/d] [GUID]
	/?      = Print this help message.
	/v      = Version, website, and legal info.
	/d GUID = Delete schedule with matching GUID.
	blank   = Print basic details for all WpTaskScheduler schedules.
	GUID    = Print expanded details for schedule with matching GUID.
	          GUID example: 8b99402b-55d3-45ae-baf9-4bd18d293720

Description:

This program in default mode (blank) prints basic details for all WpTaskScheduler schedules. 
This includes the schedule's GUID and the schedule's name.

If the schedule GUID is added to the command line all details for the schedule are printed 
including the schedule action and the schedule triggers. See the note 1 below for an explanation.

An option "/d" to delete a given schedule is provided. 	

Note 1:

A basic explanation of schedule actions and triggers follows.

Action - The action to be taken when the scheduled task is triggered. May be one of the following: 

	TASK_ACTION_LAUNCH:		Execute the given program with arguments
	TASK_ACTION_EXTENDED:	Invoke an associated DLL that isn't implemented
	TASK_ACTION_EVENT:		Signal a system event
	TASK_ACTION_WNF		 	Send the accompanying Windows Notification Facilty (WNF) message
	TASK_ACTION_WNF_ADHOC:	Send the accompanying Windows Notification Facilty (WNF) adhoc message
	
Triggers - The triggers that may trigger the scheduled task. Multiple (aggregate) triggers can be used.

	TASK_TRIGGER_PERIODIC:		A periodic trigger with an optional early WNF trigger.
	TASK_TRIGGER_PERIODICEX:	A periodic trigger with an optional early aggregate trigger.
	TASK_TRIGGER_WNFSTATE:		Triggered by the given Windows Notification Facility (WNF) message.	
	TASK_TRIGGER_AGGREGATE		An aggregate of triggers.
	TASK_TRIGGER_SYSTEMEVENT	A system event trigger.
	TASK_TRIGGER_CEAGGREGATE	An CE aggregate of triggers.
	TASK_TRIGGER_ALARM			A one off trigger that triggers on the given time.	

Note 2:

For current Window 10 desktop implementations only one task schedule is normally listed.
This has a schedule name of SimpleActivityScheduleTimer_{GUID} where GUID is
a random GUID of the form B355AAC7-C678-4A45-A787-C242C4B570C4.

This schedule is generated by the OneSyncSvc service. The schedule is periodically triggered every 12 hours.

The OneSyncSvc is a service that "synchronizes mail, contacts, calendar and various other user data". 
It is also known as ActiveSync and is used to synchronise Windows Phones, OneDrive and some web based apps. 

Schedule execution is logged in the main "Task Scheduler" window in the "Task Status" section under it's GUID only.

It is also logged in the "Event Viewer" under the classification below which includes the GUID and the 
ActionName "JD_TaskSchedulerSchedule".

	"Application and Services Log->Microsoft->Windows->TaskScheduler" 

Screen shots and more information regarding the above is availiable at the following link.

https://answers.microsoft.com/en-us/windows/forum/all/oddly-named-tasks-in-task-scheduler-revealed/0259c489-335b-47f2-b35e-5815f2a2604e

Note 3:

As a test if you are not currently syncing you can delete the SimpleActivityScheduleTimer schedule using this program and then restart OneSyncSvc in
services.exe (it is listed as OneSyncSvc_26aa2 where 26aa2 is a random number) to regenerate the schedule.

Usage Examples
==============

E:\Andy>WpTasks.exe /?

Usage: WpTasks [/?][/v][/d] [GUID]
/?      = Print this help message.
/v      = Version, website, and legal info.
/d GUID = Delete schedule with matching GUID.
blank   = Print basic details for all WpTaskScheduler schedules.
GUID    = Print expanded details for schedule with matching GUID.
          GUID example: 8b99402b-55d3-45ae-baf9-4bd18d293720

E:\Andy>WpTasks.exe

ScheduleGUID                            ScheduleName
------------                            ------------

{b355aac7-c678-4a45-a787-c242c4b570c4}  SimpleActivityScheduleTimer_{B355AAC7-C678-4A45-A787-C242C4B570C4}

E:\Andy>WpTasks.exe b355aac7-c678-4a45-a787-c242c4b570c4

ScheduleGuid        = {b355aac7-c678-4a45-a787-c242c4b570c4}
ScheduleName        = SimpleActivityScheduleTimer_{B355AAC7-C678-4A45-A787-C242C4B570C4}
ScheduleFlags       = 0x0
StartTimeDate       = NULL
EndTimeDate         = NULL
MaxRuncount         = -1 [NO LIMIT]
ScheduleActionType  = 2 [TASK_ACTION_EVENT]
  Member0           = 0xf1910000
  EventName         = Global\JD_TaskSchedulerSchedule_{B355AAC7-C678-4A45-A787-C242C4B570C4}
ScheduleTriggerType = 2 [TASK_TRIGGER_AGGREGATE]
  AggregateTriggerType = 0
  Aggregrate[0]
    ScheduleTriggerType = 1 [TASK_TRIGGER_WNFSTATE]
      WnfStateTriggerType = 1
      StateName           = 0xa3bc2075, 0x02831628 [WNF_EXEC_THERMAL_LIMITER_TERMINATE_BACKGROUND_TASKS]
      StateData           = {00,00,00,00}
      Delay               = 0
      Flags               = 0x0
  Aggregrate[1]
    ScheduleTriggerType = 1 [TASK_TRIGGER_WNFSTATE]
      WnfStateTriggerType = 1
      StateName           = 0xa3bc1875, 0x1583002e [WNF_CNET_DPU_GLOBAL_STATE_OFF_TRACK]
      StateData           = {01,00,00,00}
      Delay               = 0
      Flags               = 0x0
  Aggregrate[2]
    ScheduleTriggerType = 1 [TASK_TRIGGER_WNFSTATE]
      WnfStateTriggerType = 2
      StateName           = 0xa7916045, 0x41c64e6d
      StateData           = {}
      Delay               = 0
      Flags               = 0x0
  Aggregrate[3]
    ScheduleTriggerType = 0 [TASK_TRIGGER_PERIODIC]
      PeriodicTriggerType   = 0x1
      PeriodicIntervalMins  = 0x2d0
      PeriodicToleranceMins = 0xb4
      EarlyTrigger
        WnfStateTriggerType = 1
        StateName           = 0xa3bc7075, 0x1583002e [WNF_CNET_RADIO_ACTIVITY_OR_NON_CELLULAR_CONNECTED]
        StateData           = {01}
        Delay               = 0
        Flags               = 0x0

Task Statistics

Runcount         = 10
LastLaunchResult = 0 (0x0) [ERROR_SUCCESS]
LastLaunchTime   = 26/05/2020 11:51:00 PM AUS Eastern Standard Time
CreateTime       = 22/05/2020 2:51:00 AM AUS Eastern Standard Time

E:\Andy>WpTasks.exe /d b355aac7-c678-4a45-a787-c242c4b570c4

Schedule {b355aac7-c678-4a45-a787-c242c4b570c4} deleted

E:\Andy>WpTasks.exe /v
		  
Version 1.0

Usage and distribution conditions:

1) Free to use.
2) May only be downloaded from following link.
3) Links to this download are acceptable.
4) May not be distributed in any other form.
5) May not be modified.

For downloads:
https://dl.dropbox.com/s/ykjjv9owrqbskx5/WpTasks.zip?dl=1

For info, feedback, and discussion:
https://www.tenforums.com/general-support/157178-hidden-task-revealer.html#post1920444

Copyright: Andy Bruin 2020
