I have written a cron job:
@Scheduled(cron=\"${process.virtual.account.start}\")
public void ecomProcessVirAccOrderPaymentsScheduler() {
LOGGER.info(\"St
Which version of spring framework are you using? This won't work if it is less than 3.0.1.
Bug Report here in Spring 3.0.0 and it has been fixed in 3.0.1.
So if you are using Spring 3.0.1 or greater then following things you have to do to use in cron expression
classpath:ApplicationProps.properties
After That Use it in using the @Scheduled method like
Update: In case if you are using spring boot no need to do anything, below code excerpt should work.
@Scheduled(cron="${instructionSchedularTime}")
public void load(){
}
Note: fixed delay and fixed-rate cann't take property value from placeholder because they take long value. Cron attribute take argument as String so you can use placeholder for that.