0
我有以下批处理功能如何模拟在云中运行批处理?
@Scheduled(cron="0 15 1 * * ?")
public void executeJob() {
try {
System.out.println("Execute Batch Job : START"); //TODO
businessOperationAdminService.executeBatchJob(false, BATCH_USERNAME);
System.out.println("Execute Batch Job : END"); //TODO
}
catch(Exception ex) {
ex.printStackTrace();
}
}
@Scheduled(cron="0 30 1 1 * ?")
public void executeMonthlyJob() {
try {
System.out.println("Execute Monthly Batch Job : START"); //TODO
businessOperationAdminService.executeMonthlyBatchJob(false, BATCH_USERNAME);
System.out.println("Execute Monthly Batch Job : END"); //TODO
}
catch(Exception ex) {
ex.printStackTrace();
}
}
应用程序是在云服务中,我有过的时区没有控制运行。现在我想测试30次批量运行后的结果如何让我们说。现在的问题是我不能简单地更改服务器时间并重新运行应用程序。
测试这种批处理作业的最佳方式是什么?