Skip to content

Commit

Permalink
fix: respect crontab's concurrency
Browse files Browse the repository at this point in the history
set concurrency to amount of tasks in a job
  • Loading branch information
FMotalleb committed Jul 3, 2024
1 parent 07ee89b commit c22f2da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/parser/cron_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ func addSpec(cfg *config.Config, spec cronSpec) {
job.Tasks,
task,
)
job.Concurrency++
return
}
}
Expand All @@ -171,6 +172,7 @@ func initJob(jobName string, timing string, cfg *config.Config) {
job.Name = jobName
job.Description = "Imported from cron file"
job.Disabled = false
job.Concurrency = 1
if strings.Contains(timing, "@reboot") {
job.Events = []config.JobEvent{
{
Expand Down

0 comments on commit c22f2da

Please sign in to comment.