how can I change daemon's auto materialize frequen...
# ask-ai
r
how can I change daemon's auto materialize frequency ?
s
The documentation does not provide a direct method to change the frequency at which the auto-materialize daemon operates. The auto-materialize daemon is designed to work based on the policies you set for your assets, such as
AutoMaterializePolicy.lazy()
or
AutoMaterializePolicy.eager()
, and the rules you define, such as
materialize_on_cron
or
materialize_on_missing
. If you want to control the frequency of materialization based on time, you could use the
materialize_on_cron
rule to specify a cron schedule for your assets. Here's how you can define a cron-based materialization rule for an asset:
Copy code
python
from dagster import asset, AutoMaterializeRule

@asset
def my_asset():
    # Your asset code here
    ...

# Define a cron schedule for materialization
materialize_my_asset_cron = AutoMaterializeRule.materialize_on_cron(cron_schedule="0 * * * *")
In the example above,
materialize_on_cron
is used to create a rule that materializes
my_asset
at the start of every hour. You can adjust the
cron_schedule
parameter to the desired frequency by providing a cron string that represents your schedule. If you need to adjust the frequency of the auto-materialize daemon beyond what is available through asset policies and rules, you may need to look into the daemon's configuration or operational environment. However, specific instructions for doing so are not provided in the documentation. If this is a requirement for your use case, you might want to check the latest Dagster documentation or reach out to the Dagster community for more guidance. Enable/Disable Auto-materialize daemon a... button Dagster CLI does not support turning the... button Dagster stuck in crash loop: Thread for ... button AutoMaterializePolicy.lazy should wait f... button Thank you for your feedback!