Class ProjectEventEmailScheduledTaskImpl
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.impl.ProjectEventEmailScheduledTaskImpl
-
- All Implemented Interfaces:
ProjectEventEmailScheduledTask
@Component public class ProjectEventEmailScheduledTaskImpl extends java.lang.Object implements ProjectEventEmailScheduledTask
Implementation ofProjectEventEmailScheduledTaskwhich sends emails to users when they have new events
-
-
Constructor Summary
Constructors Constructor Description ProjectEventEmailScheduledTaskImpl(ProjectEventService eventService, ProjectService projectService, EmailController emailController, ProjectSubscriptionService projectSubscriptionService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidemailUserTasks()Task that checks for new events to mail to users then fires an email.static java.util.DategetPriorDateFromCronString(java.lang.String cron)Get the last time the job was run from the given cron stringjava.lang.StringgetScheduledCronString()Ge the cron string for this scheduled task
-
-
-
Constructor Detail
-
ProjectEventEmailScheduledTaskImpl
@Autowired public ProjectEventEmailScheduledTaskImpl(ProjectEventService eventService, ProjectService projectService, EmailController emailController, ProjectSubscriptionService projectSubscriptionService)
-
-
Method Detail
-
emailUserTasks
public void emailUserTasks()
Task that checks for new events to mail to users then fires an email. This method should be made to run once per day.- Specified by:
emailUserTasksin interfaceProjectEventEmailScheduledTask
-
getPriorDateFromCronString
public static java.util.Date getPriorDateFromCronString(java.lang.String cron)
Get the last time the job was run from the given cron string- Parameters:
cron- the cron string- Returns:
- A Date of the last time the job was run
-
getScheduledCronString
public java.lang.String getScheduledCronString()
Ge the cron string for this scheduled task- Returns:
- the cron string
-
-