bamzi / jobrunner

Framework for performing work asynchronously, outside of the request flow
MIT License
1.04k stars 99 forks source link

Print the schedules of current jobs #10

Closed rjain15 closed 5 years ago

rjain15 commented 6 years ago

Is there a way to print the schedule spec in the status page. Currently the specs are send to the main cron and not saved in the jobrunner / job struct

thanks

bamzi commented 5 years ago

Schedule spec is apart of cron.job lib and it's a non-exported field. Changing that breaks backward compatibility.

type Job struct {
    Name    string
    inner   cron.Job <-- not exported
    status  uint32
    Status  string
    Latency string
    running sync.Mutex
}

You're welcome to fork and create a new branch where it is exported so you can access detailed spec