-
Notifications
You must be signed in to change notification settings - Fork 14
Scheduler
Josh Wright edited this page Jan 14, 2021
·
4 revisions
Schedules Job
s at recurring intervals, like a cron.
public struct Scheduler
Usage:
self.scheduler
.every(1.days.at(hr: 12), run: UpdateQueries())
.every(1.days.at(hr: 9, min: 27, sec: 43), run: SyncSubscriptions())
.every(1.minutes.at(sec: 30), run: RunQueries())
.every(1.minutes, run: CheckAlerts())
Schedules a Job
at a recurring interval.
@discardableResult public func every<J: Job>(_ frequency: Frequency, run job: J) -> Scheduler
- frequency: The frequency at which this
Job
should be run. SeeFrequency
. - job: The
Job
to schedule.
This Scheduler
with which more Job
s can be scheduled.
Generated at 2021-01-13T22:24:59-0800 using swift-doc 1.0.0-beta.5.
Alchemy
Types
- AlterTableBuilder
- BCryptDigest
- BasicAuthMiddleware
- BcryptError
- BelongsToRelationship
- CORSMiddleware
- CORSMiddleware.AllowOriginSetting
- CORSMiddleware.Configuration
- ColumnType
- CreateColumn
- CreateColumnBuilder
- CreateIndex
- CreateTableBuilder
- DatabaseConfig
- DatabaseError
- DatabaseField
- DatabaseKeyMappingStrategy
- DatabaseValue
- DayUnit
- Env
- FrequencyTyped
- Grammar
- HTTPAuth
- HTTPAuth.Basic
- HTTPAuth.Bearer
- HTTPBody
- HTTPError
- HasManyRelationship
- HasOneRelationship
- HasRelationship
- HourUnit
- JoinClause
- JoinType
- Launch
- Log
- MIMEType
- MinuteUnit
- ModelQuery
- MySQLDatabase
- Operator
- OrderClause
- OrderClause.Sort
- OrderedDictionary
- PapyrusClientError
- PathParameter
- PathParameter.DecodingError
- PostgresDatabase
- Query
- Request
- Response
- Router
- RuneError
- SQL
- SQLJSON
- Scheduler
- Schema
- SecondUnit
- Services
- Socket
- StaticFileMiddleware
- StringLength
- Thread
- TokenAuthMiddleware
- WeekUnit
- Weekday
- WhereBoolean
- WhereColumn
- WhereIn
- WhereIn.InType
- WhereNested
- WhereRaw
- WhereValue