cron-editor icon indicating copy to clipboard operation
cron-editor copied to clipboard

Doesn't support NCrons

Open hasithapg opened this issue 7 years ago • 5 comments

I am using this component together with Hangfire background processing server. However the generated Crontab expression from your tool doesn't accept by the server. When I read some documentation it is noticed that Hangfire uses NCrons rather than Crons.

For example, a task that need to happens in every 5 minutes your tool generates the following expression. 0 0/5 * 1/1 * ? *

However, this expression doesn't accept by the Hangfire server. The relevant NCron expression is */5 * * * *

Is it possible to support for NCron in future?

Regards

hasithapg avatar Mar 19 '18 03:03 hasithapg

@hasithapg did you find a solution? I'm using Cronos but it's not compatible at all with this editor.

rogerfar avatar Oct 05 '18 21:10 rogerfar

The Hangfire documentation states that they support Cron Expressions, are you having trouble with that?

http://docs.hangfire.io/en/latest/background-methods/performing-recurrent-tasks.html

claudiuconstantin avatar Oct 10 '18 12:10 claudiuconstantin

Yes, like @hasithapg says, you generate an expression like this: 0 0/5 * 1/1 * ? * but that's not correct, the 0's should be *'s.

rogerfar avatar Oct 10 '18 13:10 rogerfar

We're close to merge PR #9 that will address this and make the Cron expression compatible with the Cron format used by Hangfire 1.7+. Stay tuned!

claudiuconstantin avatar Nov 28 '18 15:11 claudiuconstantin

Hi, so what about supporting Hangfire format of Cron? Does this editor support it or not? When I enter '*/5 * * * *' expression - it switches to "Advanced" tab (not sure if it means it does not understand that it is "each 5 minutes", but accept it or it does not accept it)... I'd like it to switch to the first tab and highlight "5" seconds...

alexandis avatar Jan 25 '21 14:01 alexandis