
Implements a resource that reports new versions when the current time matches the crontab expression
Update your pipeline to include this new declaration of resource types. See the example pipeline yml snippet below or the Concourse docs for more details here.
--- resource_types: - name: cron-resource type: docker-image source: repository: cftoolsmiths/cron-resource resources: - name: 10-min-trigger type: cron-resource source: expression: "*/10 * * * *" location: "America/New_York" fire_immediately: true
expression: Required. The crontab expression:
| field | allowed values |
|---|---|
| minute | 0-59 |
| hour | 0-23 |
| day of month | 1-31 |
| month | 1-12 (or names, see below) |
| day of week | 0-7 (0 or 7 is Sun, or use names) |
e.g.
0 23 * * 1-5 # Run at 11:00pm from Monday to Friday
location: Optional. Defaults to UTC. Accepts any timezone that
can be parsed by [***]
e.g.
America/New_York
America/Vancouver
fire_immediately: Optional. Defaults to false. Immediately triggers the resource the first time it is checked.
check: Report the current time.Returns time.Now() as the version only if a minute since we last
fired matches the crontab expression. The first time the script runs
it will fire if a minute in the last hour matches the crontab
expression.
Parameters
None.
in: Report the given timeIf triggered by check, returns the original version as the resulting
version.
Parameters
out: Not implemented.To build the resource's go binaries, run the following command from within the cron-resource directory:
docker run -v "$PWD":/go/src/github.com/pivotal-cf-experimental/cron-resource/ \ -it golang:1.7 \ /bin/bash /go/src/github.com/pivotal-cf-experimental/cron-resource/build_in_docker_container.sh
You should see two new binaries named built-in and built-check.
Start an interactive session of your docker container to run the binaries:
docker run -v "$PWD":/go/src/github.com/pivotal-cf-experimental/cron-resource/ \ -it golang:1.7 \ /bin/sh
Within the interactive session:
cd /go/src/github.com/pivotal-cf-experimental/cron-resource/ ./built-check
It looks like it hangs, but it's waiting for you to enter some JSON:
{"source":{"expression":"* * * * *","location":"America/New_York"} } # Paste this in after running ./built-check [{"time":"2016-08-19T10:15:27.183011117-04:00"}] # This is the successful output >>>>>>> Updates README with instructions on how to use Concourse's resource types, Adds developer notes.
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务