Skip to content

How to pass information to a job scheduled using programmatic scheduling? #35117

Answered by mkouba
yhinge asked this question in Q&A
Discussion options

You must be logged in to vote

You don't need to use an anonymous class/lambda. Just declare a separate class that implements Consumer/Function and stores the information in a final field. Then simply instantiate this class and use it as a job task.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mkouba
Comment options

mkouba Aug 1, 2023
Collaborator

Answer selected by yhinge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants