I'm trying to pass a string as `run_config` into a...
# ask-community
c
I'm trying to pass a string as
run_config
into a
ScheduleDefinition
but I'm getting the following error:
Copy code
Received unexpected config entry "value" at path root:ops:initialise_okx_and_get_tables:inputs. Expected: "{ periods: (String | { json: { path: String } pickle: { path: String } value: String }) }".
What exactly am I doing wrong? Here's my code;
Copy code
@op(out=Out(io_manager_key="fs_io_manager"))
def initialise_tasks(
    context: OpExecutionContext, periods: str
) -> List[dict]:
    print(f"Period is: {period}")

@job
def my_job():
    tables = initialise_tasks()

my_schedule = ScheduleDefinition(
    job=my_job,
    cron_schedule="1 * * * *",
    default_status=DefaultScheduleStatus.RUNNING,
    run_config={
        "ops": {
            "initialise_tasks": {
                "inputs": {"periods": {"value": "1d"}}
            }
        }
    },
    name="my_hourly_schedule ",
    execution_timezone="utc",
)
s
hmm, does this work:
Copy code
"inputs": {"periods": "1d"}
c
I now get this error, any idea?
Copy code
Missing required config entry "ops" at the root. Sample config for missing entry: {'ops': {'initialise_okx_and_get_tables_daily': {'inputs': {'periods': '...'}}}}
Copy code
my_schedule = ScheduleDefinition(
    job=my_job,
    cron_schedule="1 * * * *",
    default_status=DefaultScheduleStatus.RUNNING,
    run_config={
        "ops": {
            "initialise_tasks": {
                "inputs": {"periods": "1h"}
            }
        }
    },
    name="my_hourly_schedule",
    execution_timezone="utc",
)
I'd just like to pass a simple string variable to the downstream `op`s, when declaring a
ScheduleDefinition