C# action on specific date and time -


This question is already an answer here

  • 10 answers

I make Trying an action when rolling around a certain time of one day of the week

Here I have so far:. Private zeros wbnotifier_CheckedChanged (Object Sender, EventArgs e) {if (Datetime.UTC.Nava.DiOfWeeke == Dayofweak Friday) Message Box. Show ("It's Friday"); If (Datetime.UTC.Nava.DiOfWeeke == Dayofweak Wednesday) Messages Boxes. Show ("It's Thursday"); }

How can I organize it so that action can be taken at 5:00 pm on Friday at 1:00 pm and Thursday?

Will it be similar to many times on that date?

if you want. To schedule things in the NET, you should check out. Here is an example of a CronTrigger:

  // A trigger that will activate the other at 10:42 pm in a time zone, // Build from the system default: Trigger = TriggerBuilder Create () .WithIdentity ("trigger3", "GROUP1") .WithSchedule (CronScheduleBuilder .WeeklyOnDayAndHourAndMinute (DayOfWeek.Wednesday, 10, 42) .InTimeZone (TimeZoneInfo.FindSystemTimeZoneById ("Central America Standard Time")).) .Job (myJobKey) . Build ();  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -