Skip to content

Jobs: change FE job to run every 15 minutes #23960

Closed

Description

@severinbeauvais

Currently, the FED job runs every hour on the hour. This means that a filing with a FED of 11:15 doesn't actually get filed until 12:00 (although the effective time is back-dated).

Please change the cron config for this job to run every 15 minutes. This will allow a maximum wait of 15 minutes to process a FED job at its appointed FE date and time.

Activity

  1. added
    Entities Team
    on Oct 22, 2024
  2. vikas-gov commented on Oct 24, 2024

    @vikas-gov
    Collaborator
    • Review DB stats for FED times
    • Check if there is any history/reason for hourly runs
  3. added
    Entities - Data Migration
    and removed
    Entities Team
    on Oct 30, 2024
  4. self-assigned this
    on Nov 5, 2024
  5. AimeeGao commented on Nov 7, 2024

    @AimeeGao

    Analysis Notes:

    We analyzed the filing times for Future Effective (FE) filings for CORP in the COLIN PROD database over multiple time periods (30, 90, 180, and 365 days). The data can be found in this spreadsheet.

    Key Findings(As per 1 Year Data):

    • Midnight peak: Most filings happen around midnight (0:00 and 0:01). These filings are mostly Change of Address (NOCAD), along with some Voluntary Dissolution (ADVD2) and Amalgamation (AMALH, AMALR, AMALV) filings.
    • There's also a smaller peak at late night (23:59) with about 183 filings.
    • During the rest of the day, it's pretty quiet - only 1-48 filings per hour, spread out across different times, with only a few filings.

    Technical Considerations:
    I talked with Vysakh about making our processing more frequent, and he confirmed some important points:

    • Our current cron configuration prevents job overlap issues
    • The system automatically skips new runs if the previous job hasn't been finished
    • There's no risk of duplicate processing even with more frequent runs
    • There's no technical issue if we process more frequently

    Based on this analysis, I think we can change the cron schedule to run every 15 minutes (*/15 * * * *). This change will:

    • Reduce the maximum waiting time for processing from 60 to 15 minutes
    • Better handles scattered filing times throughout the day

    Next Steps:
    If this looks good, we can:

    1. Make this change in our dev environment first.
    2. Keep an eye on how it performs
    3. Make sure everything runs smoothly with the more frequent processing then we can change it in the test and prod env.
  6. severinbeauvais commented on Nov 7, 2024

    @severinbeauvais
    CollaboratorAuthor

    Awesome analysis! I agree with this.

    Note that FE times in Dev and Test will be completely different from Prod.

    Question: any thoughts about changing when this job runs -- 00 or 05 or 55?

  7. AimeeGao commented on Nov 7, 2024

    @AimeeGao

    Thanks for the feedback! You make a good point about the environment.

    About the job start time (00/05/55):

    • Starting at 00 (current): runs would be at 00, 15, 30, 45
    • Starting at 05: Would run at 05, 20, 35, 50
    • Starting at 55: Would run at 55, 10, 25, 40

    From the data in CPROD, we see that most filings happen at 00:00/00:01, so starting the job at 00 may allow us to process these peak filings right away. In LEAR, we know COA filings are set to be effective at 12:01 am. and based on COLIN's data patterns, LEAR might follow a similar trend(though we're not entirely sure)

    If we start the job at 55 or 05, there could be some delay in processing midnight filings. I prefer starting the job at 00 to ensure we handle these peak filings on time.
    Would you prefer 55/05 for any specific considerations? I’m curious and love to hear your thoughts on this.

  8. severinbeauvais commented on Nov 7, 2024

    @severinbeauvais
    CollaboratorAuthor

    Often, jobs are staggered (ie, not right at top of the hour) to reduce the load impact of many jobs running at once.

    I don't know which consideration is most important here.

  9. AimeeGao commented on Nov 7, 2024

    @AimeeGao

    Thanks for bringing up the point about staggered jobs. I did some analysis hope of helping with this decision:
    I queried CPROD to check FE filings with a 1-60 minute gap between submission and effective time over the past 365 days. Here's what I found:

    Distribution Pattern:

    • Total filings within 60-min window: ~35 filings
    • Very evenly distributed across different minutes
    • No significant clustering at any specific minute mark
    • Slightly higher counts at 10 min (3 filings) and a few points with 2 filings

    image.png

    It seems like:

    • The data shows users set FE times quite randomly within the hour
    • No clear pattern of preferring specific minutes
    • Very low volume overall

    According to this scattered pattern and low volume, the timing impact on users would be minimal whether we run at 00, 05, or 55. The system load consideration might be more important here.

    What are your thoughts on this?

    Feedback from Sev:
    Based on the analysis, most filings are concentrated between 23:00 and 01:00. Aside from COA (which has specific scheduled time). After discussing with Sev, we have decided to keep the scheduling at 00/15/30/45 minutes past each hour.

  10. AimeeGao commented on Nov 8, 2024

    @AimeeGao

    QA Notes:

    In the Dev env, the configuration for FE filings was updated to run every 15 minutes. The cron job's execution times were verified, as shown below. it runs at 00, 15, 30, and 45 minutes.

    image.png

    Two future effective companies were incorporated in Dev for testing:
    Scenario 1:
    Time: Filed and paid at 4:14 PM for a BEN company:BC0883684 to become effective at 4:30 PM on the same day.
    Result: The company became effective as expected at 4:30 PM.
    image.png

    image.png

    Scenario 2:
    Time: Filed and paid at 4:25 PM for a BC company:BC0883685 to become effective at 4:43 PM on the same day.
    Result: The company became effective at 4:45 PM.
    image.png
    image.png

  11. severinbeauvais commented on Nov 8, 2024

    @severinbeauvais
    CollaboratorAuthor

    Excellent testing! Amazing job, Aimee!

  12. AimeeGao commented on Nov 8, 2024

    @AimeeGao

    Thank you so much, Sev! (^-^) I really appreciate all your guidance and support on this task.

  13. vishnup0422 commented on Nov 8, 2024

    @vishnup0422
    Collaborator

    Thanks for the detailed instructions Aimee,
    I filed a future effective filings for IA filing

    Screenshot 2024-11-08 at 10.36.48 AM.png

    Screenshot 2024-11-08 at 11.09.28 AM.png

    Voluntary Dissolution
    Screenshot 2024-11-08 at 10.45.40 AM.png

    Screenshot 2024-11-08 at 11.08.06 AM.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Entities - Data MigrationPriority2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions