Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dkron
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Synced
Dkron
Commits
0f733d2c
Unverified
Commit
0f733d2c
authored
5 years ago
by
Victor Castell
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #592 from yvanoers/v2.x-autorun-job
Autorun job after create
parents
028f7322
ce17ae85
No related branches found
Branches containing commit
Tags
v2.0.0-rc3
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cron/parser.go
+3
-0
3 additions, 0 deletions
cron/parser.go
dkron/api.go
+5
-0
5 additions, 0 deletions
dkron/api.go
website/content/swagger.yaml
+7
-0
7 additions, 0 deletions
website/content/swagger.yaml
website/content/usage/cron-spec.md
+1
-0
1 addition, 0 deletions
website/content/usage/cron-spec.md
with
16 additions
and
0 deletions
cron/parser.go
+
3
−
0
View file @
0f733d2c
...
...
@@ -225,6 +225,9 @@ func parseDescriptor(spec string) Schedule {
Month
:
all
(
months
),
Dow
:
all
(
dow
),
}
case
"@manually"
:
return
At
(
time
.
Time
{})
}
const
every
=
"@every "
...
...
This diff is collapsed.
Click to expand it.
dkron/api.go
+
5
−
0
View file @
0f733d2c
...
...
@@ -165,6 +165,11 @@ func (h *HTTPTransport) jobCreateOrUpdateHandler(c *gin.Context) {
return
}
// Immediately run the job if so requested
if
_
,
exists
:=
c
.
GetQuery
(
"runoncreate"
);
exists
{
h
.
agent
.
GRPCClient
.
RunJob
(
job
.
Name
)
}
c
.
Header
(
"Location"
,
fmt
.
Sprintf
(
"%s/%s"
,
c
.
Request
.
RequestURI
,
job
.
Name
))
renderJSON
(
c
,
http
.
StatusCreated
,
&
job
)
}
...
...
This diff is collapsed.
Click to expand it.
website/content/swagger.yaml
+
7
−
0
View file @
0f733d2c
...
...
@@ -65,6 +65,13 @@ paths:
required
:
true
schema
:
$ref
:
"
#/definitions/job"
-
in
:
query
name
:
runoncreate
description
:
If present, regardless of any value, causes the job to be run immediately after being succesfully created or updated.
required
:
false
schema
:
type
:
boolean
allowEmptyValue
:
true
responses
:
201
:
description
:
Successful response
...
...
This diff is collapsed.
Click to expand it.
website/content/usage/cron-spec.md
+
1
−
0
View file @
0f733d2c
...
...
@@ -63,6 +63,7 @@ You may use one of several pre-defined schedules in place of a cron expression.
@daily (or @midnight) | Run once a day, midnight | 0 0 0 * * *
@hourly | Run once an hour, beginning of hour | 0 0 * * * *
@minutely | Run once a minute, beginning of minute | 0 * * * * *
@manually | Never runs | N/A
### Intervals
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment