com.formkiq.server.service.ScheduledServices Maven / Gradle / Ivy
package com.formkiq.server.service;
import java.util.Date;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import com.formkiq.server.config.DateService;
import com.formkiq.server.dao.FolderLogDao;
/**
* Scheduled Services.
*
*/
@Service
public class ScheduledServices {
/** DateService. */
@Autowired
private DateService dateservice;
/**
* FolderLogDao.
*/
@Autowired
private FolderLogDao folderLogDao;
/**
* Schedule Compacting Log at the top of every hour.
*/
@Scheduled(cron = "00 00 * * * *")
@Transactional
public void doSomething() {
Date now = this.dateservice.now();
this.folderLogDao.compactLog(now);
}
}