Java Code Examples for org.quartz.CronScheduleBuilder#dailyAtHourAndMinute()

The following examples show how to use org.quartz.CronScheduleBuilder#dailyAtHourAndMinute() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GlassSchedulerParser.java    From quartz-glass with Apache License 2.0 5 votes vote down vote up
private static ScheduleBuilder<? extends Trigger> parseAtExpr(String atExpr) {
    Matcher matcher = atExprPattern.matcher(atExpr);
    if (!matcher.matches()) throw new RuntimeException(atExpr + " is not valid");

    if (matcher.group(1).equals("??")) {
        return CronScheduleBuilder.cronSchedule("0 " + matcher.group(2) + " * * * ?");
    }

    DateTimeFormatter formatter = DateTimeFormat.forPattern("HH:mm");
    DateTime dateTime = formatter.parseDateTime(matcher.group().trim());

    return CronScheduleBuilder.dailyAtHourAndMinute(dateTime.getHourOfDay(),
            dateTime.getMinuteOfHour());
}
 
Example 2
Source File: DefaultBuildManager.java    From onedev with MIT License 4 votes vote down vote up
@Override
public ScheduleBuilder<?> getScheduleBuilder() {
	return CronScheduleBuilder.dailyAtHourAndMinute(0, 0);
}
 
Example 3
Source File: DefaultIssueChangeManager.java    From onedev with MIT License 4 votes vote down vote up
@Override
public ScheduleBuilder<?> getScheduleBuilder() {
	return CronScheduleBuilder.dailyAtHourAndMinute(1, 0);
}
 
Example 4
Source File: DefaultAttachmentStorageManager.java    From onedev with MIT License 4 votes vote down vote up
@Override
public ScheduleBuilder<?> getScheduleBuilder() {
	return CronScheduleBuilder.dailyAtHourAndMinute(0, 0);
}