Is it possible to crate a job that will trigger immediately ? when i want the job to be triggres now i builed a cron expression string with the current date and time - i think it's too complicated, is there another way to trigger the job immediately ?
Thank's In Advance.
Yeah, use the following Trigger
to immediately fire your job instead of waiting upon the Cron Expressions.
String jobName = ""; // Your Job Name
String groupName = ""; // Your Job Group
Trigger trigger = TriggerBuilder.newTrigger()
.withIdentity(jobName, groupName)
.startNow()
.build();