Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to write Cron expression to execute a trigger on 3rd Sunday of every month at 11 PM?
    text
    copied!<p>I want to fire a trigger on 3rd Sunday of every month. In cron expression I used cron="0 0 23 ? * 1#3" But its gives me Exception </p> <pre><code>java.lang.NumberFormatException: For input string: "1#3" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.valueOf(Unknown Source) at org.springframework.scheduling.support.CronSequenceGenerator.getRange(CronSequenceGenerator.java:324) at org.springframework.scheduling.support.CronSequenceGenerator.setNumberHits(CronSequenceGenerator.java:297) at org.springframework.scheduling.support.CronSequenceGenerator.setDays(CronSequenceGenerator.java:275) at org.springframework.scheduling.support.CronSequenceGenerator.parse(CronSequenceGenerator.java:241) at org.springframework.scheduling.support.CronSequenceGenerator.&lt;init&gt;(CronSequenceGenerator.java:81) at org.springframework.scheduling.support.CronTrigger.&lt;init&gt;(CronTrigger.java:54) at org.springframework.scheduling.support.CronTrigger.&lt;init&gt;(CronTrigger.java:44) at org.springframework.scheduling.config.ScheduledTaskRegistrar.afterPropertiesSet(ScheduledTaskRegistrar.java:188) at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:209) at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:1) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:324) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:929) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) </code></pre> <p>Here is code I am trying</p> <pre><code>@Scheduled(cron="0 0 23 ? * 1#3") // Fire at 11 PM on the third sunday of every month public void sendReportNotCreatedNotificationToStudent() throws Exception{ scheduleNotificationIntf.sendScheduleNotificationToStudent("createReportRemainder.html"); } </code></pre> <p>Please anyone tell about this error. How can I achieve this Cron expression.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload