Skip to content
This repository was archived by the owner on Mar 25, 2026. It is now read-only.

Latest commit

 

History

History
19 lines (13 loc) · 1.5 KB

File metadata and controls

19 lines (13 loc) · 1.5 KB

Step 3: Setting up a Monthly Cron Job

Let's set up a monthly cron job! In our case, a monthly CRON job is run on the 25th day of each month triggering the “monthlyAggregationPipeline” function which aggregates the daily documents and creates a new collection called “Customer Trip Monthly”.

  • Navigate to App Services and click on “Triggers”.
  • Add a Trigger.
  • Select a Scheduled Trigger type as seen in the figure below.

image

  • Name it “MonthlyReportCron” Click the “Basic” button and under “Repeat once by:” input the desired day of the month as seen in the figure below. In our case, we put the 25th day of each month. Click the “Function” button as seen in the figure below and select the monthlyAggregationPipeline function.

image

After the 25th of the month, you can navigate back to your Atlas Data Services digital underwriting collection, where you’ll see a new collection called “customerTripMonthly”. All of the monthly documents will now be stored here as seen in the figure below.

image

Let's move on to Step 4 where we will set up a trigger that will calculate the new monthly premium.