MediaMath / lambda-cron

LambdaCron - serverless cron tool
Apache License 2.0
25 stars 4 forks source link

Feature: Tasks Index #10

Open javibravo opened 7 years ago

javibravo commented 7 years ago

When the AWS Lambda function runs it reads all the task definitions (yml files) in the directory (tasks) and evaluate the cron expression for each of them. While the number of task grows performance will be affected negatively.

Proposal:

  1. When uploading the tasks to S3 create a file indexing tasks files by cron expression. In this way the AWS Lambda function will read the index file, evaluate different cron expressions only once and will read only the files with the tasks that must be executed. Example:
*/30 * * * *:
    - my_task_definition_1.yml
    - my_task_definition_2.yml
0 * * * *:
    - my_task_definiiton_3.yml