icustomcronjobparams - juanitopons/fullstack-test GitHub Wiki

fullstack-test-server - v1.0.0GlobalsICustomCronJobParams

Interface: ICustomCronJobParams

Hierarchy

  • CronJobParameters

    ICustomCronJobParams

Index

Properties

Properties

Optional context

context? : any

Inherited from ICustomCronJobParams.context

Defined in node_modules/@types/cron/index.d.ts:64

The context within which to execute the onTick method. This defaults to the cronjob itself allowing you to call this.stop(). However, if you change this you'll have access to the functions and values within your context object.


cronTime

cronTime: string | Date | Moment

Inherited from ICustomCronJobParams.cronTime

Defined in node_modules/@types/cron/index.d.ts:44

The time to fire off your job. This can be in the form of cron syntax or a JS Date object.


name

name: string

Defined in src/cron.jobs.ts:16


Optional onComplete

onComplete? : CronCommand | null

Inherited from ICustomCronJobParams.onComplete

Defined in node_modules/@types/cron/index.d.ts:52

A function that will fire when the job is stopped with job.stop(), and may also be called by onTick at the end of each run.


onTick

onTick: CronCommand

Inherited from ICustomCronJobParams.onTick

Defined in node_modules/@types/cron/index.d.ts:48

The function to fire at the specified time. If an onComplete callback was provided, onTick will receive it as an argument. onTick may call onComplete when it has finished its work.


Optional runOnInit

runOnInit? : boolean

Inherited from ICustomCronJobParams.runOnInit

Defined in node_modules/@types/cron/index.d.ts:68

This will immediately fire your onTick function as soon as the requisit initialization has happened. This option is set to false by default for backwards compatibility.


Optional start

start? : boolean

Inherited from ICustomCronJobParams.start

Defined in node_modules/@types/cron/index.d.ts:56

Specifies whether to start the job just before exiting the constructor. By default this is set to false. If left at default you will need to call job.start() in order to start the job (assuming job is the variable you set the cronjob to). This does not immediately fire your onTick function, it just gives you more control over the behavior of your jobs.


Optional timeZone

timeZone? : string

Inherited from ICustomCronJobParams.timeZone

Defined in node_modules/@types/cron/index.d.ts:60

Specify the timezone for the execution. This will modify the actual time relative to your timezone. If the timezone is invalid, an error is thrown. You can check all timezones available at Moment Timezone Website. Probably don't use both timeZone and utcOffset together or weird things may happen.


Optional unrefTimeout

unrefTimeout? : boolean

Inherited from ICustomCronJobParams.unrefTimeout

Defined in node_modules/@types/cron/index.d.ts:76

If you have code that keeps the event loop running and want to stop the node process when that finishes regardless of the state of your cronjob, you can do so making use of this parameter. This is off by default and cron will run as if it needs to control the event loop. For more information take a look at timers#timers_timeout_unref from the NodeJS docs.


Optional utcOffset

utcOffset? : string | number

Inherited from ICustomCronJobParams.utcOffset

Defined in node_modules/@types/cron/index.d.ts:72

This allows you to specify the offset of your timezone rather than using the timeZone param. Probably don't use both timeZone and utcOffset together or weird things may happen.

⚠️ **GitHub.com Fallback** ⚠️