Skip to content

Commit

Permalink
set cron timer testing script batch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchell Laferla committed Jul 3, 2023
1 parent d2a8a1d commit d86233f
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 10 deletions.
15 changes: 10 additions & 5 deletions monitoring_weekly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ def main(mytimer: func.TimerRequest) -> None:


# call function with script name in folder that you wish to run. Do not include file extension ie: ".py"
#run_script('weekly_sama_reporting')
#run_script('weekly_autolinker_100_links_audit')
#run_script('weekly_insights_brand_monitoring')
#run_script('weekly_new_brand_combos')
run_script('weekly_new_store_monitoring')

try:
run_script('weekly_sama_reporting')
run_script('weekly_autolinker_100_links_audit')
run_script('weekly_insights_brand_monitoring')
run_script('weekly_new_brand_combos')
run_script('weekly_new_store_monitoring')

except:
print("There was a problem running a script")


def run_script(script_name):
Expand Down
2 changes: 1 addition & 1 deletion monitoring_weekly/function.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "mytimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "2 * * * *"
"schedule": "0 5 * * MON"
}
]
}
3 changes: 2 additions & 1 deletion monitoring_weekly/weekly_autolinker_100_links_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def main(mytimer: func.TimerRequest) -> None:
"""
try:
sp.transmissions.send(
recipients=['mfelipe@headset.io', 'rmontenigro@headset.io'],
#recipients=['mfelipe@headset.io', 'rmontenigro@headset.io'],
recipients=['mlaferla@headset.io'],
html=msgHtml,
from_email='analytics-monitor@headset.io',
subject="Autolinker 100 link audit",
Expand Down
3 changes: 2 additions & 1 deletion monitoring_weekly/weekly_insights_brand_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ def main(mytimer: func.TimerRequest) -> None:
"""
try:
sp.transmissions.send(
recipients=['mlaferla@headset.io', 'plong@headset.io', 'cooper@headset.io'],
#recipients=['mlaferla@headset.io', 'plong@headset.io', 'cooper@headset.io'],
recipients=['mlaferla@headset.io'],
html=msgHtml,
from_email='analytics-monitor@headset.io',
subject="Insights Brand Monitoring",
Expand Down
3 changes: 2 additions & 1 deletion monitoring_weekly/weekly_new_brand_combos.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def main(mytimer: func.TimerRequest) -> None:
"""
try:
sp.transmissions.send(
recipients=['mfelipe@headset.io', 'rmontenigro@headset.io'],
#recipients=['mfelipe@headset.io', 'rmontenigro@headset.io'],
recipients=['mlaferla@headset.io'],
html=msgHtml,
from_email='analytics-monitor@headset.io',
subject="New Brand Combos",
Expand Down
1 change: 1 addition & 0 deletions monitoring_weekly/weekly_new_store_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def main(mytimer: func.TimerRequest) -> None:
"""
try:
sp.transmissions.send(
#recipients=['mlaferla@headset.io', 'plong@headset.io', 'cooper@headset.io'],
recipients=['mlaferla@headset.io'],
html=msgHtml,
from_email='analytics-monitor@headset.io',
Expand Down
3 changes: 2 additions & 1 deletion monitoring_weekly/weekly_sama_reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def main(mytimer: func.TimerRequest) -> None:

try:
response = sp.transmissions.send(
recipients=['mlaferla@headset.io', 'cooper@headset.io', 'rmontenigro@headset.io', 'mfelipe@headset.io','jeniffer.aloo@nbo.samadc.org','nancy.mwangi@nbo.samadc.org','saveria.achieng@samasource.org','benjamin.ndungu@nbo.samadc.org','holuga@samasource.org'],
#recipients=['mlaferla@headset.io', 'cooper@headset.io', 'rmontenigro@headset.io', 'mfelipe@headset.io','jeniffer.aloo@nbo.samadc.org','nancy.mwangi@nbo.samadc.org','saveria.achieng@samasource.org','benjamin.ndungu@nbo.samadc.org','holuga@samasource.org'],
recipients=['mlaferla@headset.io'],
html='Please find the Headset team\'s unlinks and flagged products attached. Reach out to cooper@headset.io with issues or questions.',
from_email='analytics-monitor@headset.io',
subject='Headset Weekly Flag and Unlink Export',
Expand Down

0 comments on commit d86233f

Please sign in to comment.