Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corresponded to a file with default settings #2

Merged
merged 2 commits into from
May 27, 2023
Merged

Conversation

bluerabbit
Copy link
Owner

@bluerabbit bluerabbit commented May 26, 2023

Support for the following configuration files

defaults:
  uri: https://yourdomain.example.com/api/v1/jobs
  http_method: POST
  time_zone: Asia/Tokyo
  http_headers:
    Authorization: 'Bearer <%= ENV["SECRET"] %>'
    Content-Type: application/json

jobs:
  - name: WeeklyJob
    description: 'Runs every week at 9:00 a.m. Created:<%= Time.now.strftime("%Y/%m/%d %-H:%M") %>'
    schedule: '0 9 * * *'
    params:
      job_name: weekly_job
  - name: DailyJob
    description: 'Runs every day at 10:30 a.m. Created:<%= Time.now.strftime("%Y/%m/%d %-H:%M") %>'
    schedule: '30 10 * * *'
    params:
      job_name: daily_job

The results are as follows

jobs:
  - name: WeeklyJob
    description: 'Runs every week at 9:00 a.m. Created:<%= Time.now.strftime("%Y/%m/%d %-H:%M") %>'
    schedule: '0 9 * * *'
    params:
      job_name: weekly_job
    uri: https://yourdomain.example.com/api/v1/jobs
    http_method: POST
    time_zone: Asia/Tokyo
    http_headers:
      Authorization: 'Bearer <%= ENV["SECRET"] %>'
      Content-Type: application/json
  - name: DailyJob
    description: 'Runs every day at 10:30 a.m. Created:<%= Time.now.strftime("%Y/%m/%d %-H:%M") %>'
    schedule: '30 10 * * *'
    params:
      job_name: daily_job
    uri: https://yourdomain.example.com/api/v1/jobs
    http_method: POST
    time_zone: Asia/Tokyo
    http_headers:
      Authorization: 'Bearer <%= ENV["SECRET"] %>'
      Content-Type: application/json

@bluerabbit bluerabbit merged commit 84411a0 into master May 27, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant