Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix timer trigger #70

Merged
merged 1 commit into from
Nov 6, 2022
Merged

fix timer trigger #70

merged 1 commit into from
Nov 6, 2022

Conversation

querdenker2k
Copy link
Collaborator

crons was generated false.

@querdenker2k querdenker2k mentioned this pull request Nov 2, 2022
Copy link
Collaborator

@seime seime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love to see some tests! :)

executionContext.getHour().map(String::valueOf).orElse("*"), "*", "*", "*");
String cron = String.format("%s %s %s %s %s %s", executionContext.getSecond().map(String::valueOf).orElse("0"),
executionContext.getMinute().map(String::valueOf).orElse("0"),
executionContext.getHour().map(String::valueOf).orElse("0"), "*", "*", "*");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use %s with the last 3 static fields? * * *?

I find the code reasier to read the fewer replacements there are.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if i should add flags for day, month, day-of-week to JRuleWhenTimeTrigger as well. This is the preparation for this. I could remove the "unused" %s flags. Shall I?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seaside1 wdyt?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I guess it is easier to have fewer replacements, but then again if you plan on adding flags for day, month etc. Then maybe not worth changing back?

@seime
Copy link
Collaborator

seime commented Nov 6, 2022

@querdenker2k could you rebase?

@seaside1
Copy link
Owner

seaside1 commented Nov 6, 2022

Probably my fault since I renamed the TimerExecutor to JRuleTimeExecutor, but should be easy to fix.

@seime
Copy link
Collaborator

seime commented Nov 6, 2022

Oh sorry @querdenker2k you just pushed seconds before me ;)

@seime seime merged commit 3007677 into seaside1:main Nov 6, 2022
@querdenker2k querdenker2k deleted the fix_time_triggers branch November 12, 2022 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants