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

Cron job setup for agents #133

Open
TonioSnowden opened this issue Feb 27, 2025 · 2 comments
Open

Cron job setup for agents #133

TonioSnowden opened this issue Feb 27, 2025 · 2 comments
Assignees

Comments

@TonioSnowden
Copy link
Collaborator

Ok I will create a ScheduleConfig class that will look something like this :

class ScheduleFrequency(StrEnum):
    DAILY = "daily"
    WEEKLY = "weekly"
    MONTHLY = "monthly"
    CUSTOM = "custom"

class ScheduleConfig(BaseModel):
    frequency: ScheduleFrequency
    time: time  # Time of day to run
    day_of_week: Optional[int] = None  # 0-6 for weekly
    day_of_month: Optional[int] = None  # 1-31 for monthly
    custom_cron: Optional[str] = None  # For custom cron expressions

daily_schedule = ScheduleConfig(
        frequency=ScheduleFrequency.DAILY,
        time=time(hour=9, minute=0)
    )

The you pass to the env. This is for the straightforward version. For the prompt detection I will prompt engineering a module to return a instance of the ScheduleConfig if the prompt mentionned a schedule.

The rest is just a basic cron job for running the agent.

@TonioSnowden TonioSnowden self-assigned this Feb 27, 2025
@andreakiro andreakiro changed the title Cron job detection. Cron job setup for agents Feb 28, 2025
@andreakiro
Copy link
Contributor

The abstraction for the cron job is a bit simple but OK to start with but 1) I have the same concern as #131 (comment) regarding the .env and a notte-config.yml file. 2) The part of the rest is just a basic cron job for running the agent requires some attention. How do you setup this cron job exactly?

@andreakiro
Copy link
Contributor

Also, let's split the setup of cron jobs for agent (this issue) and the module detecting if a scheduling is requested by user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants