this is the main cron job class
More...
#include <Csocket.h>
|
| CCron () |
|
virtual | ~CCron () |
|
void | run (timeval &tNow) |
| This is used by the Job Manager, and not you directly.
|
|
void | StartMaxCycles (double dTimeSequence, uint32_t iMaxCycles) |
|
void | StartMaxCycles (const timeval &tTimeSequence, uint32_t iMaxCycles) |
|
void | Start (double dTimeSequence) |
| starts and runs infinity amount of times
|
|
void | Start (const timeval &TimeSequence) |
|
void | Stop () |
| call this to turn off your cron, it will be removed
|
|
void | Pause () |
| pauses excution of your code in RunJob
|
|
void | UnPause () |
| removes the pause on RunJon
|
|
void | Reset () |
| reset the timer
|
|
timeval | GetInterval () const |
|
uint32_t | GetMaxCycles () const |
|
uint32_t | GetCyclesLeft () const |
|
bool | isValid () const |
| returns true if cron is active
|
|
const CS_STRING & | GetName () const |
|
void | SetName (const CS_STRING &sName) |
|
timeval | GetNextRun () const |
| returns the timestamp of the next estimated run time. Note that it may not run at this EXACT time, but it will run at least at this time or after
|
|
virtual void | RunJob () |
| this is the method you should override
|
|
this is the main cron job class
You should derive from this class, and override RunJob() with your code
- Author
- Jim Hull csock.nosp@m.et@j.nosp@m.imloc.nosp@m.o.co.nosp@m.m
◆ CCron()
◆ ~CCron()
virtual CCron::~CCron |
( |
| ) |
|
|
inlinevirtual |
◆ GetCyclesLeft()
uint32_t CCron::GetCyclesLeft |
( |
| ) |
const |
◆ GetInterval()
timeval CCron::GetInterval |
( |
| ) |
const |
◆ GetMaxCycles()
uint32_t CCron::GetMaxCycles |
( |
| ) |
const |
◆ GetName()
◆ GetNextRun()
timeval CCron::GetNextRun |
( |
| ) |
const |
|
inline |
returns the timestamp of the next estimated run time. Note that it may not run at this EXACT time, but it will run at least at this time or after
◆ isValid()
bool CCron::isValid |
( |
| ) |
const |
returns true if cron is active
◆ Pause()
pauses excution of your code in RunJob
◆ Reset()
◆ run()
void CCron::run |
( |
timeval & |
tNow | ) |
|
This is used by the Job Manager, and not you directly.
◆ RunJob()
virtual void CCron::RunJob |
( |
| ) |
|
|
virtual |
this is the method you should override
Reimplemented in CFPTimer.
◆ SetName()
void CCron::SetName |
( |
const CS_STRING & |
sName | ) |
|
◆ Start() [1/2]
void CCron::Start |
( |
const timeval & |
TimeSequence | ) |
|
◆ Start() [2/2]
void CCron::Start |
( |
double |
dTimeSequence | ) |
|
starts and runs infinity amount of times
◆ StartMaxCycles() [1/2]
void CCron::StartMaxCycles |
( |
const timeval & |
tTimeSequence, |
|
|
uint32_t |
iMaxCycles |
|
) |
| |
◆ StartMaxCycles() [2/2]
void CCron::StartMaxCycles |
( |
double |
dTimeSequence, |
|
|
uint32_t |
iMaxCycles |
|
) |
| |
- Parameters
-
TimeSequence | how often to run in seconds |
iMaxCycles | how many times to run, 0 makes it run forever |
◆ Stop()
call this to turn off your cron, it will be removed
◆ UnPause()
removes the pause on RunJon
◆ m_bRunOnNextCall
bool CCron::m_bRunOnNextCall |
|
protected |
if set to true, RunJob() gets called on next invocation of run() despite the timeout
The documentation for this class was generated from the following file: