question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot edit Monthly trigger set to last day of month

See original GitHub issue

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
----------------------------------------

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
dahallcommented, May 6, 2019

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

0reactions
vincentparrettcommented, May 6, 2019

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trigger for the last day of the month - Configuration
Is there a time template trigger for the last day of the month? I would like to set up an automation that sends...
Read more >
Set a trigger to run function the last hour of each month
First create a trigger from project Edit > current project's trigger or register it programmatically that will run every day at 11 pm....
Read more >
Power Automate End of Month and Start of Month ... - YouTube
... flow that checks if today is the last day or first day of the month. ... Condition, Compose action, and Recurrence trigger...
Read more >
How to set up repeating event in Google Calendar on last ...
Monthly on the first Sunday; Annually on 1st of the month; Every weekday; Custom (repeat every day, week, month, year) and certain day...
Read more >
Solved: How to know when a monthly recurrent flow will run...
How do I know which day of the month the flow is going to run? ... You can set the advanced options of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found