Index: lib/style/skins/sanparks/sanparks-scw.css
===================================================================
--- lib/style/skins/sanparks/sanparks-scw.css	(revision 5011)
+++ lib/style/skins/sanparks/sanparks-scw.css	(nonexistent)
@@ -1,83 +0,0 @@
- /*
-  *   '$RCSfile$'
-  *     Purpose: Default style sheet for KNB project web pages 
-  *              Using this stylesheet rather than placing styles directly in 
-  *              the KNB web documents allows us to globally change the 
-  *              formatting styles of the entire site in one easy place.
-  *   Copyright: 2000 Regents of the University of California and the
-  *               National Center for Ecological Analysis and Synthesis
-  *     Authors: Matt Jones
-  *
-  *    '$Author: daigle $'
-  *      '$Date: 2008-07-06 21:25:34 -0700 (Sun, 06 Jul 2008) $'
-  *  '$Revision: 4080 $'
-  *
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License as published by
-  * the Free Software Foundation; either version 2 of the License, or
-  * (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-  */
-
-/********************************************************************** 
- * simple calendar widgit settings.  See: 
- *          style/common/widgits/simple-calendar-widget.js
- * for a full list of possible css settings.
- **********************************************************************/
-
-table.scw {
-	background-color: #124325;
-}
-
-td.scwCells {
-	background-color: #7BB865;
-}
-
-td.scwCells:hover,td.scwCellsHover {
-	background-color: #ECCE00;
-}
-
-td.scwInputDate {
-	background-color: #124325;
-	color: #7BB865;
-}
-
-td.scwInputDate:hover,td.scwInputDateHover {
-	background-color: #ECCE00;
-	color: #000000;
-}
-
-td.scwCellsWeekend {
-	background-color: #7BB865;
-	color: #000000;
-}
-
-td.scwCellsWeekend:hover,td.scwCellsWeekendHover {
-	background-color: #ECCE00;
-}
-
-td.scwCellsExMonth {
-	color: #000000;
-}
-
-td.scwCellsExMonth:hover,td.scwCellsExMonthHover {
-	background-color: #ECCE00;
-}
-
-td.scwNow {
-	background-color: #124325;
-}
-
-td.scwNow:hover {
-	color: #ECCE00;
-}
-
-

Property changes on: lib/style/skins/sanparks/sanparks-scw.css
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: lib/style/skins/sanparks/sanparks-scheduled-jobs.css
===================================================================
--- lib/style/skins/sanparks/sanparks-scheduled-jobs.css	(revision 5011)
+++ lib/style/skins/sanparks/sanparks-scheduled-jobs.css	(revision 5012)
@@ -50,7 +50,7 @@
 .content-subsection {
 	vertical-align: middle;
 	margin: 0px 0px 0px 195px;
-	width: 750px;
+	width: 800px;
 }
 
 .content-subsection-header {
@@ -173,6 +173,10 @@
  * tpc search result specific settings
  **********************************************************************/
 
+.col {
+	padding-left: 5px;
+}
+
 .col1 {
 	width: 210px;
 	text-align: left;
@@ -188,10 +192,14 @@
 }
 
 .col4 {
-	width: 80px;
+	width: 60px;
 }
 
 .col5 {
-	width: 80px;
+	width: 70px;
+}
+
+.col6 {
+	width: 110px;
 	border-right: none;
 }
Index: lib/style/common/scheduledWorkflowResultset.xsl
===================================================================
--- lib/style/common/scheduledWorkflowResultset.xsl	(revision 5011)
+++ lib/style/common/scheduledWorkflowResultset.xsl	(revision 5012)
@@ -42,7 +42,8 @@
 			<div class="col col2">Status</div>
 			<div class="col col3">Start Time</div>
 			<div class="col col4">Interval</div>
-			<div class="col col5">Action</div>
+			<div class="col col5">Run Count</div>
+			<div class="col col6">Action</div>
 		</div>	
 		<!-- div>jobs: <xsl:number value="count(scheduledWorkflowResultset/scheduledJob)" />	</div -->	
 		<!-- This tests to see if there are returned documents,
@@ -70,6 +71,9 @@
 						<xsl:value-of select='./intervalValue' /><xsl:value-of select='./intervalUnit' /> 		
 					</div>
 					<div class="col col5">	
+						1 of 10
+					</div>
+					<div class="col col6">	
 						<a>
 							<xsl:choose>
 							<xsl:when test="./status = 'scheduled'">
Index: lib/style/common/scheduleWorkflowRunSection.jsp
===================================================================
--- lib/style/common/scheduleWorkflowRunSection.jsp	(revision 5011)
+++ lib/style/common/scheduleWorkflowRunSection.jsp	(revision 5012)
@@ -91,6 +91,11 @@
 						<div class="field-suffix"><%= TimeZone.getDefault().getDisplayName(true, TimeZone.SHORT) %> &nbsp;&nbsp;(mm/dd/yyyy hh:mm:ss)</div>
 					</div>
 					<div class="form-input-row">
+						<div class="field-label" id='start-time-label' >End Time: </div>  
+						<input class="date-input" name='endtime' id='endtime' /> 
+						<div class="field-suffix"><%= TimeZone.getDefault().getDisplayName(true, TimeZone.SHORT) %> &nbsp;&nbsp;(mm/dd/yyyy hh:mm:ss) (optional)</div>
+					</div>
+					<div class="form-input-row">
 						<div class="field-label" id='interval-label' >Interval: </div>  
 						<input class="int-input" name='intervalvalue' id='intervalvalue' /> 
 						<select class="dropdown-input" name='intervalunit'>
Index: src/upgrade-db-to-1.9.2-postgres.sql
===================================================================
--- src/upgrade-db-to-1.9.2-postgres.sql	(revision 5011)
+++ src/upgrade-db-to-1.9.2-postgres.sql	(revision 5012)
@@ -12,6 +12,7 @@
   group_name VARCHAR(512) NOT NULL,
   class_name VARCHAR(1024) NOT NULL,
   start_time TIMESTAMP NOT NULL,
+  end_time TIMESTAMP,
   interval_value INT NOT NULL,
   interval_unit VARCHAR(8) NOT NULL,
   CONSTRAINT scheduled_job_pk PRIMARY KEY (id),
Index: src/edu/ucsb/nceas/metacat/workflow/WorkflowJob.java
===================================================================
--- src/edu/ucsb/nceas/metacat/workflow/WorkflowJob.java	(revision 5011)
+++ src/edu/ucsb/nceas/metacat/workflow/WorkflowJob.java	(revision 5012)
@@ -39,6 +39,10 @@
 import org.kepler.executionWS.KeplerWebServiceLocator;
 import org.kepler.executionWS.KeplerWebServicePortType;
 
+import edu.ucsb.nceas.metacat.scheduler.ScheduledJobAccess;
+import edu.ucsb.nceas.metacat.scheduler.ScheduledJobDAO;
+import edu.ucsb.nceas.metacat.scheduler.ScheduledJobParamDAO;
+
 public class WorkflowJob implements InterruptableJob {
 	
 	private static Logger logMetacat = Logger.getLogger(WorkflowJob.class);
@@ -63,24 +67,40 @@
 				throw new JobExecutionException("WorkflowJob.execute - Could not get job data map from job detail"); 
 			}
 			
+			String jobName = jobDetail.getName();
+			
+			ScheduledJobAccess jobAccess = new ScheduledJobAccess();
+			ScheduledJobDAO jobDAO = jobAccess.getJobByName(jobName);
+			
+			if(jobDAO == null) {
+				String errorMessage = "WorkflowJob.execute - Could not retrieve job info from " 
+					+ "database for job: " + jobName;
+				logMetacat.error(errorMessage);
+				throw new JobExecutionException(errorMessage);
+			}
+			
 			// the kar lsid must be part of the job data map
-			String karLSID = jobDataMap.getString("karid");
+			ScheduledJobParamDAO jobParamDAO = jobDAO.getAllJobParams().get("karid");
+			if (jobParamDAO == null) {
+				throw new JobExecutionException("WorkflowJob.execute - Could not get job param named karid from " 
+						+ "job data map for job: " + jobName);
+			}
+			String karLSID = jobParamDAO.getValue();
 			if (karLSID == null) {
-				throw new JobExecutionException("WorkflowJob.execute - Could not get kar LSID from job data map");
+				throw new JobExecutionException("WorkflowJob.execute - Could not get kar LSID for job: " + jobName);
 			}
 			
 			// Locate service
-			logMetacat.debug("WorkflowJob.execute - Getting serviceLocator");
+			logMetacat.debug("WorkflowJob.execute - Getting kepler webservice Locator");
 			KeplerWebServiceLocator serviceLocator = new KeplerWebServiceLocator();
 			
 			// get endpoint service
-			logMetacat.debug("WorkflowJob.execute - Getting service");
+			logMetacat.debug("WorkflowJob.execute - Getting kepler webservice");
 			KeplerWebServicePortType serviceEndpoint = serviceLocator.getKeplerWebServiceHttpSoap11Endpoint();
 			
 			// call execute against remote endpoint
 			logMetacat.debug("WorkflowJob.execute - Executing with kar lsid:" + karLSID);
-			String status = serviceEndpoint.execute(karLSID);
-			//String status = serviceEndpoint.getStatus(karLSID);		
+			String status = serviceEndpoint.execute(karLSID);		
 			logMetacat.debug("WorkflowJob.execute - Status: " + status);
 			
 		} catch (RemoteException re) {
Index: src/edu/ucsb/nceas/metacat/workflow/WorkflowScheduler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/workflow/WorkflowScheduler.java	(revision 5011)
+++ src/edu/ucsb/nceas/metacat/workflow/WorkflowScheduler.java	(revision 5012)
@@ -106,8 +106,10 @@
 		 		
 		String delays[] = params.get("delay");
 		String startTimes[] = params.get("starttime");
+		String endTimes[] = params.get("endtime");
 		HashMap<String, String> jobParams = new HashMap<String, String>();
 		Calendar startCal = null;
+		Calendar endCal = null;
 
 		try {
 			SchedulerService schedulerService = SchedulerService.getInstance();
@@ -121,6 +123,11 @@
 				// if delay and starttime were not provided, set date to now.
 				startCal = Calendar.getInstance();
 			}
+			
+			// get end time.  null is fine.
+			if (endTimes != null && endTimes.length > 0) {
+				endCal = DateUtil.humanReadableToCalendar(endTimes[0], "MM/dd/yyyy HH:mm:ss");
+			} 
 
 			// interval value must exist
 			String intervalValues[] = params.get("intervalvalue");
@@ -139,7 +146,7 @@
 			}
 			String intervalUnit = intervalUnits[0];
 
-			// workflow id unit must exist.  Add to job params
+			// workflow id must exist.  Add to job params
 			String workflowids[] = params.get("workflowid");
 			if (workflowids == null || workflowids.length == 0) {
 				throw new MetacatSchedulerException("WorkflowScheduler.scheduleJob - workflowid field must be populated "
@@ -168,7 +175,7 @@
 					+ Calendar.getInstance().getTimeInMillis();
 
 			// Schedule the job
-			String xmlResult = schedulerService.scheduleJob(jobName, startCal, intervalValue, intervalUnit,
+			String xmlResult = schedulerService.scheduleJob(jobName, startCal, endCal, intervalValue, intervalUnit,
 					WORKFLOW_JOB_CLASS, WORKFLOW_JOB_GROUP, jobParams, username, groups);
 
 			// if there is a forwardto param on the request, then send the user to the page
Index: src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobDAO.java
===================================================================
--- src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobDAO.java	(revision 5011)
+++ src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobDAO.java	(revision 5012)
@@ -45,6 +45,7 @@
 	private String _groupName;
 	private String _className;
 	private Timestamp _startTime;
+	private Timestamp _endTime;
 	private int _intervalValue;
 	private String _intervalUnit;
 	private HashMap<String, ScheduledJobParamDAO> _jobParams = new HashMap<String, ScheduledJobParamDAO>();
@@ -99,6 +100,16 @@
 		_startTime = startTime;
 	}
 	
+	// get the end time
+	public Timestamp getEndTime() {
+		return _endTime;
+	}
+	
+	// set the end time
+	public void setEndTime(Timestamp endTime) {
+		_endTime = endTime;
+	}
+	
 	// get the interval value
 	public int getIntervalValue() {
 		return _intervalValue;
Index: src/edu/ucsb/nceas/metacat/scheduler/SchedulerService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/scheduler/SchedulerService.java	(revision 5011)
+++ src/edu/ucsb/nceas/metacat/scheduler/SchedulerService.java	(revision 5012)
@@ -150,6 +150,10 @@
 		Calendar startTimeCal = Calendar.getInstance();
         startTimeCal.setTime(jobDAO.getStartTime());
         
+		// convert the start time to a calendar object
+		Calendar endTimeCal = Calendar.getInstance();
+        endTimeCal.setTime(jobDAO.getEndTime());
+        
         // extract the job parameters from their data objects and put into a string map
         HashMap<String, String> jobParams = new HashMap<String, String>();
         HashMap<String, ScheduledJobParamDAO> jobParamDAOs = jobDAO.getAllJobParams();
@@ -158,8 +162,9 @@
         }
         
         // schedule the job
-		return scheduleJob(jobDAO.getName(), startTimeCal, jobDAO.getIntervalValue(), jobDAO.getIntervalUnit(),
-				jobDAO.getClassName(), jobDAO.getGroupName(), jobParams, username, groups);
+		return scheduleJob(jobDAO.getName(), startTimeCal, endTimeCal, jobDAO.getIntervalValue(), 
+				jobDAO.getIntervalUnit(), jobDAO.getClassName(), jobDAO.getGroupName(), 
+				jobParams, username, groups);
 	}
 	
 	/**
@@ -185,8 +190,8 @@
 	 *            the user's group name
 	 * @return a message saying that the job was scheduled
 	 */
-	public String scheduleJob(String jobName, Calendar startCal, int intervalValue, String intervalUnit,
-			String jobClassName, String jobGroup, HashMap<String, String> jobParams, 
+	public String scheduleJob(String jobName, Calendar startCal, Calendar endCal, int intervalValue, 
+			String intervalUnit, String jobClassName, String jobGroup, HashMap<String, String> jobParams, 
 			String username, String[] groups) throws ServiceException {
         
         Class<Job> jobClass = null;
@@ -200,13 +205,13 @@
 					+ ", interval unit: " + intervalUnit);
 
 			// start the job in the job scheduler
-			startJob(jobName, startCal, intervalValue, intervalUnit, jobClass, jobGroup,
+			startJob(jobName, startCal, endCal, intervalValue, intervalUnit, jobClass, jobGroup,
 					jobParams);
 
 			// get a database access object and create the job in the database
 
 			ScheduledJobAccess jobAccess = new ScheduledJobAccess();
-			jobAccess.createJob(jobName, jobName, jobGroup, jobClass, startCal,
+			jobAccess.createJob(jobName, jobName, jobGroup, jobClass, startCal, endCal,
 					intervalValue, intervalUnit, jobParams);
 		} catch (AccessException ae) {
 			try {
@@ -316,6 +321,9 @@
 			Calendar startCal = Calendar.getInstance();
 	        startCal.setTime(jobDAO.getStartTime());
 	        
+			Calendar endCal = Calendar.getInstance();
+	        endCal.setTime(jobDAO.getEndTime());
+	        
 	        HashMap<String, String> jobParams = new HashMap<String, String>();
 	        HashMap<String, ScheduledJobParamDAO> jobParamDAOs = jobDAO.getAllJobParams();
 	        for (String paramName : jobParamDAOs.keySet()) {
@@ -337,7 +345,7 @@
 	        		+ ", interval unit: " + jobDAO.getIntervalUnit());  
 			
 	        // start the job in the scheduler
-			startJob(jobDAO.getName(), startCal, jobDAO.getIntervalValue(), jobDAO.getIntervalUnit(), jobClass, jobDAO.getGroupName(), jobParams);
+			startJob(jobDAO.getName(), startCal, endCal, jobDAO.getIntervalValue(), jobDAO.getIntervalUnit(), jobClass, jobDAO.getGroupName(), jobParams);
 	        
 			// update the status in the database
 			jobDAO.setStatus(StatusUtil.SCHEDULED);
@@ -532,7 +540,7 @@
 	 * @param groups
 	 *            the user's group name
 	 */
-	private void startJob(String jobName, Calendar startCal, int intervalValue, String intervalUnit,
+	private void startJob(String jobName, Calendar startCal, Calendar endCal, int intervalValue, String intervalUnit,
 			Class<Job> jobClass, String jobGroup, HashMap<String, String> jobParams) throws ServiceException { 
 		
 		JobDetail jobDetail = new JobDetail(jobName, jobGroup, jobClass);
@@ -544,19 +552,19 @@
 		switch (intervalChar) {
 		case 's':
 		case 'S':
-			scheduleSecondlyJob(jobName, jobClass, startCal, intervalValue, jobGroup, jobDetail);
+			scheduleSecondlyJob(jobName, jobClass, startCal, endCal, intervalValue, jobGroup, jobDetail);
 			break;
 		case 'm':
 		case 'M':
-			scheduleMinutelyJob(jobName, jobClass, startCal, intervalValue, jobGroup, jobDetail);
+			scheduleMinutelyJob(jobName, jobClass, startCal, endCal, intervalValue, jobGroup, jobDetail);
 			break;
 		case 'h':
 		case 'H':
-			scheduleHourlyJob(jobName, jobClass, startCal, intervalValue, jobGroup, jobDetail);
+			scheduleHourlyJob(jobName, jobClass, startCal, endCal, intervalValue, jobGroup, jobDetail);
 			break;
 		case 'd':
 		case 'D':
-			scheduleDailyJob(jobName, jobClass, startCal, intervalValue, jobGroup, jobDetail);
+			scheduleDailyJob(jobName, jobClass, startCal, endCal, intervalValue, jobGroup, jobDetail);
 			break;
 		default:
 			throw new ServiceException("SchedulerService.scheduleJob - Could not interpret interval unit: " 
@@ -580,11 +588,14 @@
 	 * @param jobDetail
 	 *            the job detail object
 	 */
-	private void scheduleSecondlyJob(String jobName, Class<Job> jobClass, Calendar startTime, int interval, String jobGroup, JobDetail jobDetail) throws ServiceException {
+	private void scheduleSecondlyJob(String jobName, Class<Job> jobClass, Calendar startTime, Calendar endTime, int interval, String jobGroup, JobDetail jobDetail) throws ServiceException {
 
 		Trigger trigger = TriggerUtils.makeSecondlyTrigger(interval);
 		trigger.setName(jobName);
 		trigger.setStartTime(startTime.getTime());
+		if (endTime != null) {
+			trigger.setEndTime(endTime.getTime());
+		}
 
 		try {
 			sched.scheduleJob(jobDetail, trigger);
@@ -610,11 +621,14 @@
 	 * @param jobDetail
 	 *            the job detail object
 	 */
-	private void scheduleMinutelyJob(String jobName, Class<Job> jobClass, Calendar startTime, int interval, String jobGroup, JobDetail jobDetail) throws ServiceException {
+	private void scheduleMinutelyJob(String jobName, Class<Job> jobClass, Calendar startTime, Calendar endTime, int interval, String jobGroup, JobDetail jobDetail) throws ServiceException {
 
 		Trigger trigger = TriggerUtils.makeMinutelyTrigger(interval);
 		trigger.setName(jobName);
 		trigger.setStartTime(startTime.getTime());
+		if (endTime != null) {
+			trigger.setEndTime(endTime.getTime());
+		}
 
 		try {
 			sched.scheduleJob(jobDetail, trigger);
@@ -640,11 +654,14 @@
 	 * @param jobDetail
 	 *            the job detail object
 	 */
-	private void scheduleHourlyJob(String jobName, Class<Job> jobClass, Calendar startTime, int interval, String jobGroup, JobDetail jobDetail) throws ServiceException {
+	private void scheduleHourlyJob(String jobName, Class<Job> jobClass, Calendar startTime, Calendar endTime, int interval, String jobGroup, JobDetail jobDetail) throws ServiceException {
 
 		Trigger trigger = TriggerUtils.makeHourlyTrigger(interval);
 		trigger.setName(jobName);
 		trigger.setStartTime(startTime.getTime());
+		if (endTime != null) {
+			trigger.setEndTime(endTime.getTime());
+		}
 
 		try {
 			sched.scheduleJob(jobDetail, trigger);
@@ -670,11 +687,14 @@
 	 * @param jobDetail
 	 *            the job detail object
 	 */
-	private void scheduleDailyJob(String jobName, Class<Job> jobClass, Calendar startTime, int interval, String jobGroup, JobDetail jobDetail) throws ServiceException {
+	private void scheduleDailyJob(String jobName, Class<Job> jobClass, Calendar startTime, Calendar endTime, int interval, String jobGroup, JobDetail jobDetail) throws ServiceException {
 
 		Trigger trigger = TriggerUtils.makeHourlyTrigger(interval * 24);
 		trigger.setName(jobName);
 		trigger.setStartTime(startTime.getTime());
+		if (endTime != null) {
+			trigger.setEndTime(endTime.getTime());
+		}
 
 		try {
 			sched.scheduleJob(jobDetail, trigger);
Index: src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobAccess.java
===================================================================
--- src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobAccess.java	(revision 5011)
+++ src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobAccess.java	(revision 5012)
@@ -214,12 +214,14 @@
 			}
 			pstmt = conn.prepareStatement(sql);
 			
-			logMetacat.info("SQL getAllJobs - " + sql);
+			String sqlReport = "ScheduledJobAccess.getAllJobs - SQL: " + sql;
 			if (groupName != null) {
 				pstmt.setString(1, groupName);
 				
-				logMetacat.info("SQL params:  [" + groupName + "]");
+				sqlReport += " [" + groupName + "]";
 			}
+			
+			logMetacat.info(sqlReport);
 						
 			pstmt.execute();
 			
@@ -287,7 +289,7 @@
 	 *            a map of parameters that are associated with this job.
 	 */
 	public void createJob(String name, String triggerName, String groupName,
-			Class<Job> jobClass, Calendar startTime, int intervalValue,
+			Class<Job> jobClass, Calendar startTime, Calendar endTime, int intervalValue,
 			String intervalUnit, HashMap<String, String> jobParams)
 			throws AccessException {
 		
@@ -299,6 +301,7 @@
 		jobDAO.setGroupName(groupName);
 		jobDAO.setClassName(jobClass.getName());
 		jobDAO.setStartTime(new Timestamp(startTime.getTimeInMillis()));
+		jobDAO.setEndTime(new Timestamp(endTime.getTimeInMillis()));
 		jobDAO.setIntervalValue(intervalValue);
 		jobDAO.setIntervalUnit(intervalUnit);
 
@@ -316,8 +319,8 @@
 		// First insert the job
 		try {
 			String sql = 
-				"INSERT INTO scheduled_job (date_created, date_updated, status, name, trigger_name, group_name, class_name, start_time, interval_value, interval_unit) " 
-				+ "VALUES(now(), now(), ?, ?, ?, ?, ?, ?, ?, ?)";		
+				"INSERT INTO scheduled_job (date_created, date_updated, status, name, trigger_name, group_name, class_name, start_time, end_time, interval_value, interval_unit) " 
+				+ "VALUES(now(), now(), ?, ?, ?, ?, ?, ?, ?, ?, ?)";		
 			pstmt = conn.prepareStatement(sql);
 		
 			pstmt.setString(1, jobDAO.getStatus());
@@ -326,18 +329,26 @@
 			pstmt.setString(4, jobDAO.getGroupName());
 			pstmt.setString(5, jobDAO.getClassName());
 			pstmt.setTimestamp(6, jobDAO.getStartTime());
-			pstmt.setInt(7, jobDAO.getIntervalValue());
-			pstmt.setString(8, jobDAO.getIntervalUnit());
+			pstmt.setTimestamp(7, jobDAO.getEndTime());
+			pstmt.setInt(8, jobDAO.getIntervalValue());
+			pstmt.setString(9, jobDAO.getIntervalUnit());
 			
-			logMetacat.info("SQL createJob - " + sql);
-			logMetacat.info("SQL params:  [" + jobDAO.getStatus() + ","
-					+ jobDAO.getName() + ","
-					+ jobDAO.getTriggerName() + ","
-					+ jobDAO.getGroupName() + ","
-					+ jobDAO.getClassName() + ",(Timestamp)"
-					+ jobDAO.getStartTime().toString() + ","
-					+ jobDAO.getIntervalValue() + ","
-					+ jobDAO.getIntervalUnit() + "]");
+			String sqlReport = "ScheduledJobAccess.createJob - SQL: " + sql 
+				+ " [" + jobDAO.getStatus() + ","
+				+ jobDAO.getName() + ","
+				+ jobDAO.getTriggerName() + ","
+				+ jobDAO.getGroupName() + ","
+				+ jobDAO.getClassName() + ",(Timestamp)"
+				+ jobDAO.getStartTime().toString() + ",";
+			if(jobDAO.getEndTime() == null) {
+				sqlReport += "null,";
+			} else {
+				sqlReport += jobDAO.getEndTime().toString() + ",";
+			}
+			sqlReport += jobDAO.getIntervalValue() + ","
+				+ jobDAO.getIntervalUnit() + "]";
+			logMetacat.info(sqlReport);
+			
 			pstmt.execute();
 			
 		} catch (SQLException sqle) {
@@ -399,10 +410,9 @@
 			pstmt.setString(1, jobDAO.getStatus());
 			pstmt.setLong(2, jobDAO.getId());
 			
-			logMetacat.info("ScheduledJobAccess.deleteJob - " + sql);
-			
-			logMetacat.info("SQL params:  [" + jobDAO.getStatus() + ","
-					+ jobDAO.getId() + "]");
+			String sqlReport = "ScheduledJobAccess.deleteJob - SQL: " + sql
+				+  " [" + jobDAO.getStatus() + "," + jobDAO.getId() + "]";
+			logMetacat.info(sqlReport);
 
 			pstmt.execute();
 		} catch (SQLException sqle) {
@@ -442,6 +452,7 @@
 		jobDAO.setGroupName(resultSet.getString("group_name"));
 		jobDAO.setClassName(resultSet.getString("class_name"));
 		jobDAO.setStartTime(resultSet.getTimestamp("start_time"));
+		jobDAO.setEndTime(resultSet.getTimestamp("end_time"));
 		jobDAO.setIntervalValue(resultSet.getInt("interval_value"));
 		jobDAO.setIntervalUnit(resultSet.getString("interval_unit"));
 
