trading_agent.terminal.screens.schedule_screen
¶
The Schedule page: a desk's scheduled jobs with their next runs, the latest runs, its price alerts, and a form for a new job.
It copies the web page's CronPage.tsx.
Typical usage example:
app.push_screen(ScheduleScreen('general'))
ScheduleScreen
¶
Bases: PageScreen
The Schedule page.
Creates the page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
desk_name
|
str
|
The desk the chat shows. |
required |
Source code in src/trading_agent/terminal/screens/schedule_screen.py
compose_page
¶
Builds the jobs, runs and alerts tables.
Yields:
| Type | Description |
|---|---|
Widget
|
The sections, in a scroll area. |
Source code in src/trading_agent/terminal/screens/schedule_screen.py
on_mount
¶
Sets up the tables, then reads the schedule.
Source code in src/trading_agent/terminal/screens/schedule_screen.py
refresh_page
async
¶
Reads the desk's jobs, runs and alerts.
Source code in src/trading_agent/terminal/screens/schedule_screen.py
action_new_job
¶
Opens the form for a new job.
Source code in src/trading_agent/terminal/screens/schedule_screen.py
action_run_job
¶
action_delete_selected
¶
Deletes the highlighted job or alert, whichever table has the focus.
Source code in src/trading_agent/terminal/screens/schedule_screen.py
NewJobForm
¶
Bases: ModalScreen[dict[str, Any] | None]
The form for a new scheduled job, with the web page's fields.
Creates the form.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
desk_name
|
str
|
The desk the job is for. |
required |
Source code in src/trading_agent/terminal/screens/schedule_screen.py
compose
¶
Builds the form.
Yields:
| Type | Description |
|---|---|
Widget
|
The fields, switches, error line and hint. |
Source code in src/trading_agent/terminal/screens/schedule_screen.py
on_mount
¶
action_submit
¶
Checks the fields and returns the job.