{"id":19042461,"url":"https://github.com/serverless/serverless-local-schedule","last_synced_at":"2025-04-17T18:33:42.914Z","repository":{"id":39881192,"uuid":"125552122","full_name":"serverless/serverless-local-schedule","owner":"serverless","description":"⚡️🗺️⏰ Schedule AWS CloudWatch Event based invocations in local time(with DST support!)","archived":false,"fork":false,"pushed_at":"2022-08-31T05:54:55.000Z","size":47,"stargazers_count":72,"open_issues_count":14,"forks_count":11,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-10-28T17:33:21.925Z","etag":null,"topics":["aws","cloudwatch","crontab","schedule","serverless"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serverless.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-16T18:00:24.000Z","updated_at":"2024-07-19T14:35:50.000Z","dependencies_parsed_at":"2022-09-01T10:20:15.578Z","dependency_job_id":null,"html_url":"https://github.com/serverless/serverless-local-schedule","commit_stats":null,"previous_names":["unitedincome/serverless-local-schedule"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fserverless-local-schedule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fserverless-local-schedule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fserverless-local-schedule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fserverless-local-schedule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless","download_url":"https://codeload.github.com/serverless/serverless-local-schedule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223764375,"owners_count":17198610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloudwatch","crontab","schedule","serverless"],"created_at":"2024-11-08T22:37:46.904Z","updated_at":"2025-04-17T18:33:42.905Z","avatar_url":"https://github.com/serverless.png","language":"JavaScript","readme":"**📦 Archived - This repository is archived and preserved for reference only. No updates, issues, or pull requests will be accepted. If you have questions, please reach out to our support team.**\n\n---\n\n# Serverless Local Schedule\n[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)\n[![npm](https://img.shields.io/npm/v/serverless-local-schedule.svg)](https://www.npmjs.com/package/serverless-local-schedule)\n\nThis plugin allows you to specify a timezone on your lambdas triggered by AWS CloudWatch Events.\n\n--- \n\n_Originally developed by [**Capital One**](https://www.capitalone.com/tech/open-source/), now maintained in scope of Serverless, Inc_\n\n_Capital One considers itself the bank a technology company would build. It's delivering best-in-class innovation so that its millions of customers can manage their finances with ease. Capital One is all-in on the cloud and is a leader in the adoption of open source, RESTful APIs, microservices and containers. We build our own products and release them with a speed and agility that allows us to get new customer experiences to market quickly. Our engineers use artificial intelligence and machine learning to transform real-time data, software and algorithms into the future of finance, reimagined._\n\n--- \n\n## Install\n\n```\nsls plugin install -n serverless-local-schedule\n```\n\nFor example:\n```yaml\nfunctions:\n  hello:\n    handler: handler.hello\n    events:\n      - schedule:\n          rate: cron(0 10 * * ? *)\n          timezone: America/New_York\n```\n\nIt works by converting that into 6 different schedules, effectively the same as having the following\nconfiguration:\n```yaml\nfunctions:\n  hello:\n    handler: handler.hello\n    events:\n      - schedule:\n          rate: cron(0 15 * 1-2,12 ? *) # full non-DST months\n      - schedule:\n          rate: cron(0 15 1-10 3 ? *) # non-DST portion of March\n      - schedule:\n          rate: cron(0 14 11-31 3 ? *) # DST portion of March\n      - schedule:\n          rate: cron(0 14 * 4-10 ? *) # full DST months\n      - schedule:\n          rate: cron(0 14 1-3 11 ? *) # DST portion of November\n      - schedule:\n          rate: cron(0 15 4-31 11 ? *) # non-DST portion of November\n```\n\n**NOTE:** The `- schedule: cron(* * * * ? *)` short syntax isn't supported.\n\n**NOTE:** Unfortunately you cannot specify day of the week in the cron expression i.e. `cron(0 7 ? * MON-FRI *)`. This is because to support the split months (March \u0026 November in the US), the plugin has to specify a day of month (EG: November 1-3 in 2018), so you cannot specify a DOW other than `?` unfortunately. Recommended workaround for this is to move the day of week check into your code so it's just a no-op on non weekdays for instance.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless%2Fserverless-local-schedule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless%2Fserverless-local-schedule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless%2Fserverless-local-schedule/lists"}