- allow sicscron to run with 0 sec interval
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user