Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Trax
  •  Trax
  • No customer Topic Starter
2009-06-15T17:51:56Z
Hello,

I'm using the VisualCron API for a web interface, and I'm using TimeClass.InitDate to get and set the startdatetime. I noticed that TimeClass.InitDate gets updated each time the task has run, which I didn't expect to happen and can be a bit confusing when editting a task. Is this expected behavior or should I get the original startdatetime from another property?

Regards,
Patrick
Sponsor
Forum information
Support
2009-06-17T19:09:16Z
InitDate is updated automatically. You should use Trigger.FirstRun property to control when it should start the schedule.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Trax
  •  Trax
  • No customer Topic Starter
2009-06-19T10:08:46Z
That's what I tried before using TimeClass.InitDate, but when I tried updating Trigger.FirstRun it didn't affect the next run date so I switched to TimeClass.InitDate. Should I set both when updating the start time of a job through the API?

What I think might work for me is this: when getting the time, use Trigger.FirstRun and when setting the time, use both Trigger.FirstRun and TimeClass.InitDate. Any problems with that approach?
Support
2009-06-22T10:49:53Z
InitDate gets Datetime.Now when the Trigger is created - don't you get this value?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Trax
  •  Trax
  • No customer Topic Starter
2009-06-29T09:50:43Z
Yes I do, but my thought was that it might look confusing to set a trigger to a certain datetime but later when editing it, the time has changed. That's why I was thinking I could just display the FirstRun time but also set InitDate when a job is updated.

On the other hand, this will have adverse results if a job is editted with the client instead of my web control so I guess I better just stick to InitDate exclusively.
Scroll to Top