public void createNewTimerJob(Date dueDate) { // create new timer job TimerEntity newTimer = new TimerEntity(this); newTimer.setDuedate(dueDate); Context .getCommandContext() .getJobManager() .schedule(newTimer); }
public void createNewTimerJob(Date dueDate) { // create new timer job TimerEntity newTimer = new TimerEntity(this); newTimer.setDuedate(dueDate); Context .getCommandContext() .getJobManager() .schedule(newTimer); }
protected TimerEntity createTweetTimer(String msg, Date duedate) { TimerEntity timer = new TimerEntity(); timer.setJobHandlerType("tweet"); timer.setJobHandlerConfigurationRaw(msg); timer.setDuedate(duedate); return timer; }
public Void execute(CommandContext commandContext) { JobManager jobManager = commandContext.getJobManager(); timerEntity = new TimerEntity(); timerEntity.setLockOwner(UUID.randomUUID().toString()); timerEntity.setDuedate(new Date()); timerEntity.setRetries(0); StringWriter stringWriter = new StringWriter(); NullPointerException exception = new NullPointerException(); exception.printStackTrace(new PrintWriter(stringWriter)); timerEntity.setExceptionStacktrace(stringWriter.toString()); jobManager.insert(timerEntity); assertNotNull(timerEntity.getId()); return null; } });
protected void scheduleSuspensionStateUpdate(CommandContext commandContext) { TimerEntity timer = new TimerEntity(); JobHandlerConfiguration jobHandlerConfiguration = getJobHandlerConfiguration(); timer.setDuedate(executionDate); timer.setJobHandlerType(getDelayedExecutionJobHandlerType()); timer.setJobHandlerConfigurationRaw(jobHandlerConfiguration.toCanonicalString()); commandContext.getJobManager().schedule(timer); }
protected void scheduleSuspensionStateUpdate(CommandContext commandContext) { TimerEntity timer = new TimerEntity(); JobHandlerConfiguration jobHandlerConfiguration = getJobHandlerConfiguration(); timer.setDuedate(executionDate); timer.setJobHandlerType(getDelayedExecutionJobHandlerType()); timer.setJobHandlerConfigurationRaw(jobHandlerConfiguration.toCanonicalString()); commandContext.getJobManager().schedule(timer); }
public Void execute(CommandContext commandContext) { JobManager jobManager = commandContext.getJobManager(); timerEntity = new TimerEntity(); timerEntity.setLockOwner(UUID.randomUUID().toString()); timerEntity.setDuedate(new Date()); timerEntity.setRetries(0); timerEntity.setExceptionMessage("I'm supposed to fail"); jobManager.insert(timerEntity); assertNotNull(timerEntity.getId()); return null; } });
job.setDuedate(duedate);
job.setDuedate(duedate);
public void createNewTimerJob(Date dueDate) { // create new timer job TimerEntity newTimer = new TimerEntity(this); newTimer.setDuedate(dueDate); Context .getCommandContext() .getJobManager() .schedule(newTimer); }
public Void execute(CommandContext commandContext) { JobManager jobManager = commandContext.getJobManager(); timerEntity = new TimerEntity(); timerEntity.setLockOwner(UUID.randomUUID().toString()); timerEntity.setDuedate(new Date()); timerEntity.setRetries(0); StringWriter stringWriter = new StringWriter(); NullPointerException exception = new NullPointerException(); exception.printStackTrace(new PrintWriter(stringWriter)); timerEntity.setExceptionStacktrace(stringWriter.toString()); jobManager.insert(timerEntity); assertNotNull(timerEntity.getId()); return null; } });
protected TimerEntity createTweetTimer(String msg, Date duedate) { TimerEntity timer = new TimerEntity(); timer.setJobHandlerType("tweet"); timer.setJobHandlerConfigurationRaw(msg); timer.setDuedate(duedate); return timer; }
protected void scheduleSuspensionStateUpdate(CommandContext commandContext) { TimerEntity timer = new TimerEntity(); JobHandlerConfiguration jobHandlerConfiguration = getJobHandlerConfiguration(); timer.setDuedate(executionDate); timer.setJobHandlerType(getDelayedExecutionJobHandlerType()); timer.setJobHandlerConfigurationRaw(jobHandlerConfiguration.toCanonicalString()); commandContext.getJobManager().schedule(timer); }
public Void execute(CommandContext commandContext) { JobManager jobManager = commandContext.getJobManager(); timerEntity = new TimerEntity(); timerEntity.setLockOwner(UUID.randomUUID().toString()); timerEntity.setDuedate(new Date()); timerEntity.setRetries(0); timerEntity.setExceptionMessage("I'm supposed to fail"); jobManager.insert(timerEntity); assertNotNull(timerEntity.getId()); return null; } });
job.setDuedate(duedate);