001
014
015 package com.liferay.portal.kernel.scheduler;
016
017 import com.liferay.portal.kernel.util.StringBundler;
018
019 import java.util.Date;
020
021
024 public class CronTrigger extends BaseTrigger {
025
026 public CronTrigger(String jobName, String groupName, String cronText) {
027 this(jobName, groupName, new Date(), null, cronText);
028 }
029
030 public CronTrigger(
031 String jobName, String groupName, Date startDate, String cronText) {
032
033 this(jobName, groupName, startDate, null, cronText);
034 }
035
036 public CronTrigger(
037 String jobName, String groupName, Date startDate, Date endDate,
038 String cronText) {
039
040 super(jobName, groupName, TriggerType.CRON, startDate, endDate);
041
042 _cronText = cronText;
043 }
044
045 public String getTriggerContent() {
046 return _cronText;
047 }
048
049 @Override
050 public String toString() {
051 StringBundler sb = new StringBundler(5);
052
053 sb.append("{cronText=");
054 sb.append(_cronText);
055 sb.append(", ");
056 sb.append(super.toString());
057 sb.append("}");
058
059 return sb.toString();
060 }
061
062 private String _cronText;
063
064 }