node-schedule/node-schedule

Improve API documentation for Jobs

Open

#252 ouverte le 11 févr. 2016

Voir sur GitHub
 (4 commentaires) (3 réactions) (0 assignés)JavaScript (8 826 stars) (539 forks)batch import
help wanted

Description

  1. The docs don't show how to make a Job object without scheduleJob
  2. There are several properties and methods of the Job object that are undocumented.
Job {
  job: [Function: doScan],
  callback: false,
  name: '<Anonymous Job 1>',
  trackInvocation: [Function],
  stopTrackingInvocation: [Function],
  cancel: [Function],
  cancelNext: [Function],
  nextInvocation: [Function],
  pendingInvocations: [Function] }

cancel and job are the only ones that are documented. Do any of the others have any use to the developer? 3. Document the Job contsructor, and other methods on the node-schedule module such as Invocation and cancelJob.

{ Job: 
   { [Function: Job]
     super_: 
      { [Function: EventEmitter]
        EventEmitter: [Circular],
        usingDomains: false,
        defaultMaxListeners: [Getter/Setter],
        init: [Function],
        listenerCount: [Function] } },
  Range: [Function: Range],
  RecurrenceRule: [Function: RecurrenceRule],
  Invocation: [Function: Invocation],
  scheduleJob: [Function: scheduleJob],
  scheduledJobs: {},
  cancelJob: [Function: cancelJob] }

Guide contributeur