-
-
Notifications
You must be signed in to change notification settings - Fork 797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable scheduled functions #1123
Comments
We faced the same issue. exports.handler = () => {
if (process.env.IS_OFFLINE) return;
...
} |
In order to avoid modifying function source, I'd also appreciate a way to disable scheduled functions from running for serverless-offline. |
There is another workaround that doesn't require code You can toggle the enable param on the event definition using an environment variable. ie: events:
- schedule:
enabled: ${strToBool(${env:ENABLE_SCHEDULER, "false"})} That will disable the scheduler unless |
Please, could you create a option to disable the scheduled functions.
It could be a command line option like
--disableScheduledFunctions
It's is importante because I have some funcions that manipulate data and I don't want to run it every momment on dev time.
Today, I have 2 yml files to control it:
With this new options, this process could my simpler.
The text was updated successfully, but these errors were encountered: