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

SRE-Docker Compose for CRON job #103

Open
ashishsme14 opened this issue Feb 22, 2021 · 0 comments
Open

SRE-Docker Compose for CRON job #103

ashishsme14 opened this issue Feb 22, 2021 · 0 comments

Comments

@ashishsme14
Copy link

We had a task to Create a docker file with ubuntu image

  1. Create a print.sh file which has code to print date and time
  2. Write a cron file named "hello-cron" which includes the print.sh to run for every 1 min.
  3. The docker image should have a CRON job to print date and time every 1 min

We created a print.sh file via vi command and in it given as

#!/bin/sh -l
time=$(date)
echo "::set-output name=time::$time"

After which we had executed -

chmod +x print.sh

then tried as -

* * * * * /home/scrapbook/tutorial

Not sure where we went wrong, please guide us.

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

No branches or pull requests

1 participant