Below given step by step to create hybris cron job
1. create a class MyFirstCronJob as below
/**
*
*/
package se.hm.core.cronjob;
import de.hybris.platform.cronjob. enums.CronJobResult;
import de.hybris.platform.cronjob. enums.CronJobStatus;
import de.hybris.platform.cronjob. model.CronJobModel;
import de.hybris.platform. servicelayer.cronjob. AbstractJobPerformable;
import de.hybris.platform. servicelayer.cronjob. PerformResult;
/**
* @author
*
*/
public class TestCronJob extends AbstractJobPerformable
{
/*
* (non-Javadoc)
*
* @see
* de.hybris.platform. servicelayer.cronjob. AbstractJobPerformable# perform(de.hybris.platform. cronjob.model.CronJobModel
* )
*/
private String exportDir;
/**
* @return the exportDir
*/
public String getExportDir()
{
}
/**
* @param exportDir
* the exportDir to set
*/
public void setExportDir(final String exportDir)
{
}
@Override
public PerformResult perform(final CronJobModel arg0)
{
return new PerformResult(CronJobResult. SUCCESS, CronJobStatus.FINISHED);
}
}
2. After create KumudJob.java register this cron job in xml as below
<bean id="myFirstCrobJob" class="se.hm.core.cronjob. TestCronJob" scope="tenant"
</bean>
3. Now Run UPDATE Hybris