- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 03:16 PM
Hi all,
Simple question here. Is there some kind of "flag" accessible during a job run to tell if a job has been run via manual run vs. via scheduled run? I'm wanting to have the job behave slightly differently when running in either mode and ideally it would be nice to leverage an existing flag/variable of some kind during job execution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2024 02:51 AM
Hi @ChristianRRL, you could get this information using the dynamic value references {{job.trigger.type}}
In your task settings, assign it to a parameter.
And then you could access it from within your notebook using dbutils widgets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 03:26 PM
For a bit more context, basically I would like to know *during the job run* (in Python) how the job was triggered (Manual vs Scheduled):
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2024 02:51 AM
Hi @ChristianRRL, you could get this information using the dynamic value references {{job.trigger.type}}
In your task settings, assign it to a parameter.
And then you could access it from within your notebook using dbutils widgets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2024 02:23 PM
This is exactly what I needed. Thanks!

