Skip to content
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

Add clarity around variables used with scheduled triggers #2800

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@
1. Select **Settings**.
1. Change the **Timezone** setting.
1. Select **Save**.

### Variables not working as expected

While variables can be used in the scheduled trigger, their values only get evaluated when the workflow is activated. After activating the worfklow, you can alter a variable's value in the settings but it won't change how often the workflow runs. To work around this, you must stop and then re-activate the workflow to apply the updated variable value.

Check warning on line 44 in docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/common-issues.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [from-write-good.Passive] 'be used' may be passive voice. Use active voice if you can. Raw Output: {"message": "[from-write-good.Passive] 'be used' may be passive voice. Use active voice if you can.", "location": {"path": "docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/common-issues.md", "range": {"start": {"line": 44, "column": 21}}}, "severity": "WARNING"}

Check warning on line 44 in docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/common-issues.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [from-write-good.Passive] 'is activated' may be passive voice. Use active voice if you can. Raw Output: {"message": "[from-write-good.Passive] 'is activated' may be passive voice. Use active voice if you can.", "location": {"path": "docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/common-issues.md", "range": {"start": {"line": 44, "column": 105}}}, "severity": "WARNING"}

Check failure on line 44 in docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/common-issues.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'worfklow'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'worfklow'?", "location": {"path": "docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/common-issues.md", "range": {"start": {"line": 44, "column": 140}}}, "severity": "ERROR"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the queries I have seen have been along the lines of "If i have a schedule of 1 hour and I edit the workflow and save it, does the one hour reset to from the time I saved it?" It would be good if we could answer that here too!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evilnick - Do you mean that I should add this as a separate point? It's not related to variables right?

Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
|Quarterly|`0 0 1 1,4,7,10 *`|At midnight on the 1st of January, April, July, and October.|
<!-- vale from-write-good.Weasel = YES -->

/// warning | Using variables in the Cron expression
While variables can be used in the scheduled trigger, their values only get evaluated when the workflow is activated. If you alter a variable's value in the settings after a workflow is activated, the changes won't alter the cron schedule. To re-evaluate the variable, set the workflow to **Inactive** and then back to **Active** again

Check warning on line 104 in docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [from-write-good.Passive] 'be used' may be passive voice. Use active voice if you can. Raw Output: {"message": "[from-write-good.Passive] 'be used' may be passive voice. Use active voice if you can.", "location": {"path": "docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/index.md", "range": {"start": {"line": 104, "column": 21}}}, "severity": "WARNING"}

Check warning on line 104 in docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [from-write-good.Passive] 'is activated' may be passive voice. Use active voice if you can. Raw Output: {"message": "[from-write-good.Passive] 'is activated' may be passive voice. Use active voice if you can.", "location": {"path": "docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/index.md", "range": {"start": {"line": 104, "column": 105}}}, "severity": "WARNING"}

Check warning on line 104 in docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [from-write-good.Passive] 'is activated' may be passive voice. Use active voice if you can. Raw Output: {"message": "[from-write-good.Passive] 'is activated' may be passive voice. Use active voice if you can.", "location": {"path": "docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/index.md", "range": {"start": {"line": 104, "column": 184}}}, "severity": "WARNING"}

Check warning on line 104 in docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [from-write-good.TooWordy] 'evaluate' is too wordy. Raw Output: {"message": "[from-write-good.TooWordy] 'evaluate' is too wordy.", "location": {"path": "docs/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/index.md", "range": {"start": {"line": 104, "column": 247}}}, "severity": "WARNING"}
///

#### Why there are six asterisks in the Cron expression

The sixth asterisk in the Cron expression represents seconds. Setting this is optional. The node will execute even if you don't set the value for seconds.
Expand Down