Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quartz.Net CronExpression Builder

Tags:

c#

quartz.net

I have some GUI controls forming a typical windows scheduler (Date\Time pickers, check boxes, etc) that I would like to build a CronExpression string from.

Does anyone know of a good way to build the expression string, either a pre-existing class or good approaches to tackle this problem?

like image 990
ServerMonkey Avatar asked Apr 04 '11 06:04

ServerMonkey


People also ask

What is cron expression 0 * * * *?

Meaning of cron expression 0 * * * * *? I think it means the scheduler is expected to run every seconds.

What is cron expression in C#?

A cron expression is a string comprised of 6 or 7 fields separated by white space. Fields can contain any of the allowed values, along with various combinations of the allowed special characters for that field.


2 Answers

Cron expressions in Quartz.Net are made up of 7 sub-expressions:

1. Seconds
2. Minutes
3. Hours
4. Day-of-Month
5. Month
6. Day-of-Week
7. Year (optional field)

I usually use CronMaker to create my own cron expressions.

Another option is this other tool which works pretty well.

like image 132
LeftyX Avatar answered Oct 08 '22 06:10

LeftyX


I used this jQuery plug-in with asp.net and Quartz.Net to schedule the cron jobs: http://shawnchin.github.com/jquery-cron/

This was a good alternative too: http://www.geekytidbits.com/cron-expression-descriptor-demo/Default.aspx

like image 30
Adam Seabridge Avatar answered Oct 08 '22 06:10

Adam Seabridge