C# Service Scheduling



  • Does anybody have a good resource for writing a trigger based service that would work something like Scheduled Tasks in C#?

    Essentially, I have a bunch of "remote thingies" that may or may not be available due to wandering in and out of cellular service and may or may not need to report at the same interval. The list of those items changes over time and the people that need the know about success/problems might be different for each item. We'd like to try and do something on the aforementioned individual schedules to the "thingies" and then run a some sort of report about it.

    Now that I'm thinking about it I wonder if I'm just doing this wrong .... it's probably easier (and saner) to delegate the actual task performance to Scheduled Tasks and just have a service that updates the Scheduled Tasks as the config file changes.

    Suggestions anyone?


    Filed Under: Why does Discourse recommend random topics that aren't similar at all?



  • I have good resource to write windows service. What will you trigger it on? This service watching folders and checking if there is file dropped in folders.



  • Triggers on Time-ish - but we want something more flexible than just "every day at 8:00AM" because the items have different activity profiles and it might make more sense for some to trigger only on weekends, some at lunch, etc. Also, if we pass trigger time, I don't want it to fail and try again at the next trigger time (what if we got our activity profile wrong or connectivity was bad), I want it to continue to "poll" periodically until the activity is successful or a timeout is reached.

    I'm just going to use Task Scheduler and have a background service manage config changes. We are watching for periods of low activity and grabbing information from the devices during that time.


  • Winner of the 2016 Presidential Election

    @rad131304 said:

    Now that I'm thinking about it I wonder if I'm just doing this wrong .... it's probably easier (and saner) to delegate the actual task performance to Scheduled Tasks and just have a service that updates the Scheduled Tasks as the config file changes.

    Glad we could be your rubber duck.

    Edit (better link): http://hwrnmnbsol.livejournal.com/148664.html


    Filed under: [Surprised that didn't Onebox.](#tag), [Not surprised these aren't working again.](#tag)


  • Never heard of this before, I shall have to start asking my solar powered daisy questions!



  • @rad131304 said:

    Never heard of this before, I shall have to start asking my solar powered daisy questions!

    This is also stated in Bhagavad Gita, one of Hindu people's very sacred texts.

    Do not worry about what is presently beyond your understanding. Work with what you do seem to understand, and do not worry about the rest

    It appears that a lot of big name consulting companies are following this very same mantra to bring their client companies to their knees. Case in point: Banana company in United States.



  • @rad131304 said:

    I'm just going to use Task Scheduler and have a background service manage config changes. We are watching for periods of low activity and grabbing information from the devices during that time.

    Good call.

    You'd likely just end up with a shitty version of Task Scheduler anyway, but that'd be months/years after realizing you need process isolation, generic scheduling, generic notification, etc.



  • @Nagesh said:

    Banana company in United States.

    That article is split in 6 pages. I can't read in those conditions.


  • Banned



  • Pretty much what I want to avoid. Plus I already need generic scheduling and notification.

    I was hoping there was some ready-made c# library to include so I could keep ownership of the schedule away from the OS writ large so it couldn't be potentially interfered with by other processes, but I'd much rather it be simple and robust than keep the control. After all, that's what task scheduler was designed to do.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.