Question about scheduling the first Saturday of January using Cron and date command
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading the configuration reference and the code that expands environment variables and schedules cron expressions; the issue names no files or tests. Check whether command substitution or special cron syntax is supported, then document or implement a supported way to run a job on January’s first Saturday. The thread has had no comment for 342 days, so confirm the discussion has a settled direction before starting.
索引モデルが issue の本文から書いたものです。
説明
What are you trying to do?
I am trying to schedule a Cron job that runs specifically on the first Saturday of January at midnight. I noticed that the Cron expression 0 0 1 ? 1 SAT#1 * can achieve this, but according to the configuration reference it has not allowed special characters.
Likewise, I want to know if a similar approach using standard cron syntax and the date command is supported.
What is your current configuration?
Here is the Cron expression I am considering:
# run every Saturday in January at midnight, check if it's the first Saturday
BACKUP_CRON_EXPRESSION="0 0 * 1 6 [ "$(date +\%d)" -le 7 ]"
Log output
time=2025-04-05T17:35:13.058+02:00 level=ERROR msg="Fatal error running command: unexpected command substitution at 1:38" error="main.(*command).runInForeground: error scheduling: main.(*command).schedule: error sourcing configuration: main.sourceConfiguration: error loading config files: main.loadConfigsFromEnvFiles: error reading config file /etc/dockervolumebackup/conf.d/04yearly.conf: main.source: error expanding env: unexpected command substitution at 1:38"
Additional context
I would like to confirm if this approach is valid in your Cron implementation. If it is not supported, could you recommend an alternative method to schedule a job for the first Saturday of January? Any guidance or examples would be greatly appreciated.
- 主要言語
- Go
- スター
- 4.1k
- フォーク
- 157
- 平均マージ
- 4時間 35分
- マージ済み PR(30日)
- 15
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
offen/docker-volume-backup のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
offen/docker-volume-backup#910 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Backup aborts when a file disappears during archiving (ENOENT from os.Lstat in writeTarball)対応中かも @ciltocruz が 2 日前に担当しました。 オープンenhancement pr welcome
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
offen/docker-volume-backup#908 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
offen/docker-volume-backup#879 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
maintenance pr welcome
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
offen/docker-volume-backup#869 ·
メンテナーはふだん 1 日以内に返信
-
documentation pr welcome
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
offen/docker-volume-backup#796 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
offen/docker-volume-backup の issue をすべて見る
似ている issue
-
area/ui-schema good first issue type/bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
router-for-me/CLIProxyAPI#8573 ·
メンテナーはふだん 9 日以内に返信
-
bug: minute-granularity sync timestamp makes e2e tests asserting "Already in sync" fail sporadicallyオープンbug package:cmd priority:3-low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
docToolchain/Bausteinsicht#761 ·
メンテナーはふだん 1 日以内に返信
-
Flaky test: kb TestUnknownLabelValuesAreFoldedNotExported fails when the start epoch contains 799オープンarea/knowledge kind/bug priority/p1 status/accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openagentix/openagentix#253 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
quii/learn-go-with-tests#934 · コメント 1 件 ·