*
* Parse Run statement:
*
- * Run <full|incremental|...> [on] 2 january at 23:45
+ * Run <keyword=value ...> [on] 2 january at 23:45
*
* Default Run time is daily at 0:0
*
} /* end switch */
} /* end if strcasecmp */
} /* end for RunFields */
+
+ /* At this point, it is not a keyword. Check for old syle
+ * Job Levels without keyword. This form is depreciated!!!
+ */
+ for (j=0; joblevels[j].level_name; j++) {
+ if (strcasecmp(lc->str, joblevels[j].level_name) == 0) {
+ lrun.level = joblevels[j].level;
+ lrun.job_type = joblevels[j].job_type;
+ found = TRUE;
+ break;
+ }
+ }
} /* end for found */
state = s_none;
set_defaults();
- while ((token = lex_get_token(lc)) != T_EOL) {
+ for ( ; token != T_EOL; (token = lex_get_token(lc))) {
int len, pm;
switch (token) {
case T_NUMBER:
}
if (!have_hour) {
clear_bit(0, lrun.hour);
- have_hour = TRUE;
}
p = strchr(lc->str, ':');
if (!p) {
}
set_bit(code, lrun.hour);
lrun.minute = code2;
+ have_hour = TRUE;
break;
case s_at:
have_at = TRUE;
break;
case s_monthly:
clear_defaults();
- set_bit(0, lrun.mday);
set_bits(0, 11, lrun.month);
break;
default:
* and link it into the list of run records
* in the schedule resource.
*/
- if (pass == 1) {
- trun = (RUN *) malloc(sizeof(RUN));
+ if (pass == 2) {
+ trun = (RUN *)malloc(sizeof(RUN));
memcpy(trun, &lrun, sizeof(RUN));
if (*run) {
trun->next = *run;