File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,15 +132,15 @@ jobs:
132132 echo "Updating existing Cloud Scheduler job"
133133 gcloud scheduler jobs update http ${{ env.JOB_NAME }} \
134134 --location=${{ env.PROJECT_REGION }} \
135- --schedule="* * * * *" \
135+ --schedule="0 0 * * *" \
136136 --uri="https://${{ env.PROJECT_REGION }}-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/${{ env.PROJECT_ID }}/jobs/${{ env.JOB_NAME }}:run" \
137137 --http-method=POST \
138138 --oauth-service-account-email=${{ vars.GCP_SA_EMAIL }}
139139 else
140140 echo "Creating new Cloud Scheduler job"
141141 gcloud scheduler jobs create http ${{ env.JOB_NAME }} \
142142 --location=${{ env.PROJECT_REGION }} \
143- --schedule="* * * * *" \
143+ --schedule="0 0 * * *" \
144144 --time-zone="America/Argentina/Buenos_Aires" \
145145 --uri="https://${{ env.PROJECT_REGION }}-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/${{ env.PROJECT_ID }}/jobs/${{ env.JOB_NAME }}:run" \
146146 --http-method=POST \
Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ async def _update_groups(context: ContextTypes.DEFAULT_TYPE):
426426 c = session .query (Listable ).filter_by (id = chat_db_id ).first ()
427427 if c :
428428 c .validated = False
429- await context .bot .send_message (chat_id = ROZEN_CHATID , text = f"El grupo { chat_name } murió 💀" )
429+ await context .bot .send_message (chat_id = DC_GROUP_CHATID , text = f"El grupo { chat_name } murió 💀" )
430430 else :
431431 logger .info (f"Updating URL for group '{ chat_name } '" )
432432 with get_session () as session :
@@ -528,8 +528,10 @@ def felizdia_text(today):
528528 return "Feliz " + dia + " de " + mes
529529
530530async def felizdia (context : ContextTypes .DEFAULT_TYPE ):
531+ if random .uniform (0 , 7 ) > 1 :
532+ return
531533 today = datetime .date .today ()
532- chat_id = ROZEN_CHATID
534+ chat_id = DC_GROUP_CHATID
533535 await context .bot .send_message (chat_id = chat_id , text = felizdia_text (today ))
534536
535537async def actualizarPartidos (context : ContextTypes .DEFAULT_TYPE ):
Original file line number Diff line number Diff line change 3838 - ' --region=us-central1'
3939 - ' --command=python'
4040 - ' --args=cron.py'
41- - ' --schedule=* * * * *' # Every minute
41+ - ' --schedule=0 0 * * *' # Daily at midnight #callate lereno
4242 - ' --time-zone=America/Argentina/Buenos_Aires'
You can’t perform that action at this time.
0 commit comments