Validating Cron expression

2,303 views
Skip to first unread message

gan_shiv

unread,
Apr 27, 2009, 4:18:16 AM4/27/09
to Quartz.NET, ganesh.sh...@nomura.com
Hi,

Is there a way to validate a cron expression before passing it on to a
Cron trigger? I actually have a telnet based app, from where the user
would enter the cron expression for the trigger.

Does quartz have any method that can validate the expression for me?

Regards,
Ganesh

Brian L

unread,
Apr 27, 2009, 8:38:59 AM4/27/09
to Quartz.NET
Ganesh,

I don't think there is something like that, but I could be wrong. You
could try regular expressions or try building something more complete:
http://stackoverflow.com/questions/235504/validating-crontab-entries-w-php

Brian

Julien Benoit

unread,
Apr 27, 2009, 8:54:49 AM4/27/09
to quar...@googlegroups.com
Hi,

You can use Quartz.CronExpression.IsValidExpression(string expression).

http://quartznet.sourceforge.net/apidoc/topic252.html

Regards,
--
Julien Benoit

gan_shiv

unread,
Apr 28, 2009, 3:11:01 AM4/28/09
to Quartz.NET
Thanks Julien. That works !

On Apr 27, 5:54 pm, Julien Benoit <julien.ben...@gmail.com> wrote:
> Hi,
>
> You can use Quartz.CronExpression.IsValidExpression(string expression).
>
> http://quartznet.sourceforge.net/apidoc/topic252.html
>
> Regards,
>
Reply all
Reply to author
Forward
0 new messages