- allow sicscron to run with 0 sec interval

This commit is contained in:
zolliker
2012-06-19 07:09:54 +00:00
parent bf04c301ca
commit fbb4af6ec9

View File

@ -96,7 +96,7 @@ static int CronTask(void *pData)
} }
self->tNext += self->iInterval; self->tNext += self->iInterval;
if (now > self->tNext) if (now > self->tNext)
self->tNext = now + 1; self->tNext = now;
} }
/* printf("CronTask return: %d\n", self->iEnd > 0);*/ /* printf("CronTask return: %d\n", self->iEnd > 0);*/
if(self->iEnd <= 0){ if(self->iEnd <= 0){
@ -165,7 +165,7 @@ int MakeCron(SConnection * pCon, SicsInterp * pSics, void *pData,
/* enough arguments? */ /* enough arguments? */
if (argc < 3) { if (argc < 3) {
SCPrintf(pCon, eError, "ERROR: not enough arguments to %s", argv[0]); SCPrintf(pCon, eError, "ERROR: usage: %s <interval> <script>", argv[0]);
return 0; return 0;
} }