Take the 2-minute tour ×

I want to schedule some tasks which needs to be run at everyday 3'o clock.

Spring version : 3.0

Any help how to do it?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

It can be done by using Cron expression in schedular annotations

@Scheduled(cron = "0 0 3 * * ?")
public void performTask() {

    //Do Something Here


And add below line in application conext xml file

<task:annotation-driven /> 

Cron Expression Reference: http://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm

share|improve this answer
add comment

Your Answer

