Skip to content

Instantly share code, notes, and snippets.

@sfmskywalker
Created December 6, 2020 18:48
Show Gist options
  • Save sfmskywalker/336f83284673e0f71d2a3899b9ae61e7 to your computer and use it in GitHub Desktop.
Save sfmskywalker/336f83284673e0f71d2a3899b9ae61e7 to your computer and use it in GitHub Desktop.
Elsa Workflows scheduled task snippet
class MyJob : IWorkflow
{
public void Build(IWorkflowBuilder workflow)
{
workflow
.Cron("* * * * * * *")
.WriteLine(() => $"CRON event at {DateTime.Now}");
}
}
@NiveditaGalwade
Copy link

@sfmskywalker , can you please share nuget package for .Cron("* * * * * * *")?
I am getting below error
CS1061 'IWorkflowBuilder' does not contain a definition for 'Cron' and no accessible extension method 'Cron' accepting a first argument of type 'IWorkflowBuilder' could be found (are you missing a using directive or an assembly reference?)
I am using ELSA 3.1.0
If this has been change according to latest version, can you please suggest how to achieve using elsa 3.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment