Support scheduled tasks
Right now, Service Fabric only supports always-running services.
However, applications also consist of scheduled tasks that execute e.g. daily. Right now, we have to use Azure Batch or the Windows Task Scheduler for this. But managing these tools introduces additional complexity.
Azure Service Fabric should introduce a "scheduler"-component that supports complex cron-like schedules. When the scheduler starts a service, it should monitor the exe and restart it, if it returns an error code. However, if the exe returns without an error, Service Fabric should see this as a successful execution of the task and wait for the next scheduled execution.

4 comments
-
Anonymous commented
I would love to see something similar to https://kubernetes.io/docs/tasks/job/. It would be a good match in the new resource model introduced with Service Fabric Mesh.
-
gperrego commented
Actor Reminders are not as functional as Task Scheduler. Task Scheduler helps in many ways including:
1) One stop shop. If I want to look at what has run for all 60 of my batch process I can see al schedules in one spot. If I am wondering what runs at 10:30 pm I can look and see everything in one spot. If I were to use Reminders, I would have to open 60 different code bases to find out what the schedule is. The new and improved ServiceFabric Scheduler (TM Pending) would show all schedules across the cluster.
2) History with State and return – We can view what was previously executed and when and what the return code was. The two-way communication between the spawned process and Task Scheduler is great. If we could have a Microservice be able to have two way communication with the ServiceFabric Scheduler (TM Pending) and implement some of the more advanced options like retry on fail, stop current execution or queue execution ect.
3) Run on demand - If you want to run a task off schedule/ on demand you can. For those who actually support applications when things go wrong or you are manually executing in lower environments you know this is very useful. The new ServiceFabric Scheduler (TM Pending) will expose the same ability to run on demand for cluster admins as needed.
4) Options - There are a plethora of advanced options on task scheduler that are very useful. Reminders barely start to scratch the surface on these. The new ServiceFabric Scheduler (TM Pending) will cover all of these and a few more interesting ones that only the great ServiceFabric Team can think of (or go bing Task Scheduler enhancements, one that comes to mind is business days)
5) Accessibility - One current issue with Task Scheduler is that you need to be able to remote into the server to view the TaskScheduler app, which means you pretty much need admin rights. There is a way to expose this via MMC/Event Viewer with some group policy magic but it’s pretty cryptic.
In the new and amazing ServiceFabric Scheduler (that i'm sure the great the great ServiceFabric Team is itching to build) we are not only going to supply that scheduling functionality but we are going to make it even better by exposing it via SFX. -
Lars Kemmann commented
Actor reminders are *not* cron-like. They rely heavily on custom logic in an actor to be wired up and continually retriggered.
If I create an Actor method that has a "Schedule" attribute, e.g., which in turn accepts a cron expression, that would be ideal. I would expect to be able to add an argument to the method containing the timestamp for which the method was actually triggered, since actor invocations are serialized and may be queued.
-
Nathan commented
Service fabric actor reminders.