diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-03-04 15:52:13 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-03-04 15:52:13 +0000 |
commit | 53202e5711f32c80ec89d149da7de72b2a1fc953 (patch) | |
tree | c7a8f688f718ae2643007e85ed1b035658461fd0 /src/minicron.h | |
parent | 2cb55a3b17d2381c6ec61aea3cea077253ffab3c (diff) | |
download | libbu++-53202e5711f32c80ec89d149da7de72b2a1fc953.tar.gz libbu++-53202e5711f32c80ec89d149da7de72b2a1fc953.tar.bz2 libbu++-53202e5711f32c80ec89d149da7de72b2a1fc953.tar.xz libbu++-53202e5711f32c80ec89d149da7de72b2a1fc953.zip |
Added some extra functions to Bu::MiniCron to let you execute jobs that are in
the queue immediately, with or without rescheduling, by id or name.
Diffstat (limited to '')
-rw-r--r-- | src/minicron.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/minicron.h b/src/minicron.h index 7ccf543..0d1cb62 100644 --- a/src/minicron.h +++ b/src/minicron.h | |||
@@ -110,6 +110,22 @@ namespace Bu | |||
110 | */ | 110 | */ |
111 | virtual void removeJob( JobId jid ); | 111 | virtual void removeJob( JobId jid ); |
112 | 112 | ||
113 | /** | ||
114 | * Executes the job specified right now. If bReschedule is true then | ||
115 | * the job is then removed from the queue and rescheduled as though | ||
116 | * it's time had come naturally to be run. Otherwise, it's run without | ||
117 | * interrupting the normal schedule. | ||
118 | */ | ||
119 | virtual void runJob( JobId jid, bool bReschedule=false ); | ||
120 | |||
121 | /** | ||
122 | * Executes the job specified right now. If bReschedule is true then | ||
123 | * the job is then removed from the queue and rescheduled as though | ||
124 | * it's time had come naturally to be run. Otherwise, it's run without | ||
125 | * interrupting the normal schedule. | ||
126 | */ | ||
127 | virtual void runJob( const Bu::String &sName, bool bReschedule=false ); | ||
128 | |||
113 | class JobInfo | 129 | class JobInfo |
114 | { | 130 | { |
115 | public: | 131 | public: |
@@ -234,7 +250,7 @@ namespace Bu | |||
234 | * Execute this job once, increment the runcount and schedule the | 250 | * Execute this job once, increment the runcount and schedule the |
235 | * next occurance of it. | 251 | * next occurance of it. |
236 | */ | 252 | */ |
237 | void run(); | 253 | void run( bool bReschedule=true ); |
238 | 254 | ||
239 | /** | 255 | /** |
240 | * Get the time this job will next run. | 256 | * Get the time this job will next run. |