diff --git a/.github/workflows/sync-endpoint.yml b/.github/workflows/sync-endpoint.yml index 4db642b2..ed042e43 100644 --- a/.github/workflows/sync-endpoint.yml +++ b/.github/workflows/sync-endpoint.yml @@ -1,7 +1,7 @@ name: Sync Endpoint on: schedule: - - cron: '0 22 * * *' + - cron: '* */24 * * *' jobs: sync-to-hub: diff --git a/sync/sync.py b/sync/sync.py index bce17a2a..4a681ff0 100644 --- a/sync/sync.py +++ b/sync/sync.py @@ -13,7 +13,10 @@ with open(file,"r") as f: content=f.read().strip() print('content:', content) - endpointIndex = '1' if content == '0' else '0' + index = int(content) + 1 + if index >= len(endpoints): + index = 0 + endpointIndex = str(index) f.close() except IOError: print("File not accessible")