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

github-repository-traffic/setup.github.repository.sh - Automate pushing into crontab file during setup so user does not have to hand edit #40

Open
BradleyA opened this issue Feb 10, 2020 · 2 comments
Assignees

Comments

@BradleyA
Copy link
Owner

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

->Automate the crontab during setup so user does not have to hand edit

Describe the solution you'd like

  • Steps to describe solution:

    1. Go to ->cd /usr/local/data/github
    2. Enter/Click on ->
    3. Select/Scroll-Down to ->
  • A clear and concise description of what you want to happen.

    ->crontab includes GitHub download of traffic

@BradleyA
Copy link
Owner Author

BradleyA commented Feb 10, 2020

# >>>   Remove when complete            #40
  tmp_file=$(mktemp repository.data.crontab.XXX)  ####  add before for loop
  crontab -l > tmp_file   #  Write out current crontab to a temp file  ####     add before for loop
  echo "00 09 * * 1-5 echo hello" >> tmp_file  #  Echo new cron lines into temp file  ####      add IN for loop
  crontab tmp_file  #  Install new cron file  ####      add after for loop
  rm tmp_file  ####      add after for loop
# >>>   Remove when complete            #40

@BradleyA BradleyA changed the title github-repository-traffic/setup.github.repository.sh 2.122.531 - Automate the crontab during setup so user does not have to hand edit :1 github-repository-traffic/setup.github.repository.sh - Automate pushing into crontab file during setup so user does not have to hand edit :1 Feb 16, 2020
@BradleyA BradleyA changed the title github-repository-traffic/setup.github.repository.sh - Automate pushing into crontab file during setup so user does not have to hand edit :1 github-repository-traffic/setup.github.repository.sh - Automate pushing into crontab file during setup so user does not have to hand edit Feb 16, 2020
@BradleyA
Copy link
Owner Author

In design & development (7/2019 - )

WARNING: These instructions below are incomplete. Consider them as notes quickly drafted on a napkin rather than proper documentation!

Quick Notes:

Need to automate the running of these commands and then push the updated table files to the correct repositories in the images directory. Then update the Traffic section in the README.md with the latest totals. The design should support the automation just need a way to create a new table for each future years.

cd uadmin@two: /usr/local/data/github/BradleyA/Search-docker-registry-v2-script.1.0
# rm clone.table.md view.table.md   # this is not required, only process the latest files by cron or docker in future
../../parse.repository.data.sh BradleyA.Search-docker-registry-v2-script.1.0.2019-07-29
../../parse.repository.data.sh BradleyA.Search-docker-registry-v2-script.1.0.2019-08-05
. . .
cat clone.table.md ; git add clone.table.md ; git commit -m 'updated table' clone.table.md ; git push clone.table.md
cat view.table.md ; git add view.table.md ; git commit -m 'updated table' view.table.md ; git push view.table.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant