// Not an hourly job...check if it is by the minute
if (getMinute() < 0)
{
// Not a by the minute job so must be by the second
if (getSecond() < 0)
throw new TurbineException("Error in JobEntry. Bad Job parameter.");
return SECOND;
}
else
{
// Must be a job run by the minute so we need minutes and
// seconds.
if (getMinute() < 0 || getSecond() < 0)
throw new TurbineException("Error in JobEntry. Bad Job parameter.");
return MINUTE;
}
}
else
{
// Must be a daily job by hours minutes, and seconds. In
// this case, we need the minute, second, and hour params.
if (getMinute() < 0 || getHour() < 0 || getSecond() < 0)
throw new TurbineException("Error in JobEntry. Bad Job parameter.");
return DAILY;
}
}
else
{
// Must be a weekday job. In this case, we need
// minute, second, and hour params
if (getMinute() < 0 || getHour() < 0 || getSecond() < 0)
throw new TurbineException("Error in JobEntry. Bad Job parameter.");
return WEEK_DAY;
}
}
else
{
// Must be a day of the month job. In this case, we need
// minute, second, and hour params
if (getMinute() < 0 || getHour() < 0)
throw new TurbineException("Error in JobEntry. Bad Job parameter.");
return DAY_OF_MONTH;
}
}