github eyleminde günde 1 ila 50 kez rastgele çalışan bir işi nasıl yapabilirim?
İşte benim cron işim.
cron: '0 0 * * *'
Bu günde bir kez olacak.
Ama istediğim günde 1-50 kez rastgele koşmak.
1'den 50'ye rastgele çalışmasını nasıl sağlayabilirim?
aşağıda git eylemimin yml ayar dosyası iş akışları olarak verilmiştir
#1. Repository Fork
# 2. Modify the files A and B according to the procedure
# 3. After committing the modifications, push & Enjoy!
name: planting-grass
# A. Comment lines 8-11
# on:
# push:
# branches:
# - unknown
# B. Uncomment lines 14-16
on:
schedule:
- cron: '0 0 * * *'
jobs:
task:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Execute commands
run: bash ./task.sh ${{ steps.date.outputs.date }}
- name: Commit files
run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
git add date.txt
git commit -m ${{ steps.date.outputs.date }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
Cron işleri ve rastgele zamanlar, verilen saatler içinde Bu yazı aracılığıyla yöntem çalışmaz.
Saygılarımla!