Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 774 Bytes

File metadata and controls

34 lines (27 loc) · 774 Bytes

go-scheduler

user configure a schedule and the job script, for us it would be interpreted as running a specific go function. we store user info in in-memory implementation and upgrade it later to a DB based implementation.

table :

  1. Job

    1. id
    2. cronExpression
    3. nextExecutionEpochTime
    4. created_at // not required in bare minimum
    5. created_by // not nrequired in bare minimum
  2. ExecutionLog

    1. runID
    2. jobID
    3. executionEpochTime
    4. createdAt
    5. startedAt
    6. workerID
    7. leaseAcquiedAt
    8. lastLeaseHeartBeat
    9. status
    10. output
    11. failure

for integrating DB in a prod level way :

  1. build a migration strategy
  2. write the SQL in that
  3. migrate-up and use connectors + sql package to use the DB