TaskScheduler: Cannot edit Monthly trigger set to last day of month

Describe the bug

I have a scheduled task in windows set to run on the last day of month. When opening this in the editor, and attempting to edit the trigger I get an exception.

To Reproduce Steps to reproduce the behavior:

  1. Create task in windows scheduler, set to monthly and to run on last day of month.
  2. Open the TaskSchedulerEditor for the task
  3. Click on the Edit button for the trigger.

Expected behavior Trigger editor should show

Environment (please complete the following information):

  • Windows 10
  <package id="AeroWizard" version="2.1.11" targetFramework="net40" />
  <package id="GroupControls" version="1.5.3" targetFramework="net40" />
  <package id="TaskScheduler" version="2.8.7" targetFramework="net40" />
  <package id="TaskSchedulerEditor" version="2.8.7" targetFramework="net40" />
  <package id="TimeSpan2" version="2.1.6" targetFramework="net40" />

Additional context

************** Exception Text **************
System.ArithmeticException: The flag value has more than a single bit set.
   at System.EnumUtil.BitPosition[T](T flags)
   at Microsoft.Win32.TaskScheduler.TriggerEditDialog.AvToType(AvailableTriggers av)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Microsoft.Win32.TaskScheduler.TriggerEditDialog.get_InvalidTriggers()
   at Microsoft.Win32.TaskScheduler.TriggerEditDialog.ResetCombo()
   at Microsoft.Win32.TaskScheduler.TriggerEditDialog.set_AvailableTriggers(AvailableTriggers value)
   at Microsoft.Win32.TaskScheduler.TriggerEditDialog..ctor(Trigger trigger, Boolean supportV1Only, AvailableTriggers allowedTriggers)
   at Microsoft.Win32.TaskScheduler.UIComponents.TriggerCollectionUI.GetTriggerEditDialog(String caption, Trigger t)
   at Microsoft.Win32.TaskScheduler.UIComponents.TriggerCollectionUI.triggerEditButton_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3324.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
VSoft.WindowsTaskScheduler
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///I:/FBAT_HG/Output/FB8/VSoft.WindowsTaskScheduler.DLL
----------------------------------------
Microsoft.Win32.TaskScheduler
    Assembly Version: 2.8.7.0
    Win32 Version: 2.8.7.0
    CodeBase: file:///I:/FBAT_HG/Output/FB8/Microsoft.Win32.TaskScheduler.DLL
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3314.0 built by: NET472REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Microsoft.Win32.TaskSchedulerEditor
    Assembly Version: 2.8.7.0
    Win32 Version: 2.8.7
    CodeBase: file:///I:/FBAT_HG/Output/FB8/Microsoft.Win32.TaskSchedulerEditor.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3324.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
TimeSpan2
    Assembly Version: 2.1.6.0
    Win32 Version: 2.1.6.0
    CodeBase: file:///I:/FBAT_HG/Output/FB8/TimeSpan2.DLL
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3324.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3324.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
GroupControls
    Assembly Version: 1.5.3.0
    Win32 Version: 1.5.3.0
    CodeBase: file:///I:/FBAT_HG/Output/FB8/GroupControls.DLL
----------------------------------------
Microsoft.mshtml
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.0.3300.0
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (12 by maintainers)

Most upvoted comments

Woohoo! I’ll push the update to NuGet now.