Skip to content

titodotnet/azure-servicefabric-sample

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

azure-servicefabric-sample

Introduction

This repository is aimed to hold Azure Service Fabric related samples.
Azure Service Fabric Servies can be configured to exhibit trigger based bahvior similar to WebJobs and Azure Functions. Have added a code samples to exhibit such behavior (Detailed below).

Solutions

Time triggered / Scheduler Service in Azure Service Fabric (ServiceFabricTriggerSolution)

To create a time triggered (scheduler) Service in Azure Service Fabric, I can think of following two quick options among the possible ways.

  1. Create a time triggered WebJob and add/deploy it as a guest executable in Azure Service Fabric.
  2. Create Azure Service Fabric Stateless Service and implement the listener to handle jobs.

Here I'm taking the second approach which involves the respective listener to be created. Rather than writing new Scheduling framework, I'm using the Quartz.Net framework. I'm using the CRON expression behavior to have the behavior inline with the time trigger behavior of WebJobs and Azure Functions.

SimpleTimeTriggerService
  • Uses Quartz.Net framework.
  • Without Dependency Injection.
  • Listerner gets all the IJob types from the current assembly with JobInfoAttribute decorated.
  • JobInfoAttribute holds the name and CRON expression of the job.
TimeTriggerService

Releases

No releases published

Packages

No packages published