Cron(Scheduler) in Spring.

Post moved to ExamPit please click below link to explore

Cron Scheduler…

This entry was posted in Spring. Bookmark the permalink.

7 Responses to Cron(Scheduler) in Spring.

  1. Rohit says:

    Can we implement the below given expression
    0 30 20 7,14,21,28,L * ?

  2. Andre says:

    Can we implement it each 90 days?

    * * * * */3 ?

  3. Raghuveer says:


    I want a simple spring scheduler and below is the code that is running fine. How can i stop it though? Can you please provide the code

    public class Application {
    public static void main(String[] args) throws Exception {
    ConfigurableApplicationContext context =;


    public class ScheduledTasks {
    private static final SimpleDateFormat dateFormat = new SimpleDateFormat(“HH:mm:ss”);

    @Scheduled(fixedRate = 1000)
    public void reportCurrentTime() {
    System.out.println(“The time is now ” + dateFormat.format(new Date()));

    thanks in advance

  4. Jeff says:

    Cron Job @schedule value to trigger at 12 Mid Night

  5. Danilo Braga says:

    When a use this expression: 0 15 10 ? * 6L I got the following error:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.scheduling.config.ScheduledTaskRegistrar#1’: Invocation of init method failed; nested exception is java.lang.NumberFormatException: For input string: “6L”

  6. prasad says:

    i want a cron expression that should fire exactly after six month from perticuler date

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s