From 77b60de3268a9ab1bdf4dd5adf24eb8ba951a4f7 Mon Sep 17 00:00:00 2001 From: kollegian Date: Tue, 29 Jul 2025 18:59:48 +0300 Subject: [PATCH 1/2] update schedule info --- .env.example.full | 5 +- SETUP.md | 48 +++++--------------- packages/plugin-hadrien/src/hadrienClient.ts | 2 +- 3 files changed, 17 insertions(+), 38 deletions(-) diff --git a/.env.example.full b/.env.example.full index d8640a9..1416849 100644 --- a/.env.example.full +++ b/.env.example.full @@ -967,4 +967,7 @@ BUNDLE_EXECUTOR_ADDRESS= # Address of the bundle executor contract # DESK Exchange Plugin Configration DESK_EXCHANGE_PRIVATE_KEY= # Required for trading and cancelling orders DESK_EXCHANGE_NETWORK= # "mainnet" or "testnet - +FINNHUB_API_KEY= +WORLD_NEWS_API_KEY= +IMAGEKIT_USERID= +DUNE_API_KEY= diff --git a/SETUP.md b/SETUP.md index a351a1e..0294350 100644 --- a/SETUP.md +++ b/SETUP.md @@ -235,19 +235,7 @@ Character files define the bot's personality, behavior, and scheduling: ### Understanding Schedules -Jobs are defined in the character file using cron-style scheduling: - -```json -{ - "schedules": [ - { - "days": [1, 2, 3, 4, 5], // Monday-Friday (1=Mon, 7=Sun) - "hours": [14], // 2 PM (24-hour format) - "intensity": 0.8 // Activity level (0-1) - } - ] -} -``` +Jobs are defined in the packages/plugin-hadrien/src/hadrienClient.ts file. There you can find the current set schedule. ### Current Default Jobs @@ -264,35 +252,23 @@ Jobs are defined in the character file using cron-style scheduling: #### To Disable a Job Remove or comment out the schedule entry: -```json -// "schedules": [ -// { -// "days": [1, 2, 3, 4, 5], -// "hours": [14], -// "intensity": 0.8 -// } -// ] +```ts +const schedules = [ + //API DATA ACTIONS + // { cronTime: "50 14 * * 1,2,3,4,5,7", action: this.triggerBusinessNews.bind(this), name: "Business News" }, ``` #### To Add a New Job -1. Create a new aspect in the character file -2. Define bio, templates, and schedules -3. Restart the agent +1. Create an action on plugin-hadrien/src/actions file. +2. Define triggers. +3. Add a schedule on plugin-hadrien/src/hadrienClient.ts file. #### To Modify Timing -Change the `days`, `hours`, or `intensity` values: -```json -{ - "schedules": [ - { - "days": [1, 3, 5], // Monday, Wednesday, Friday only - "hours": [9, 15, 21], // 9 AM, 3 PM, 9 PM - "intensity": 0.6 // Moderate activity - } - ] -} +Change the `days`, `hours` values: +```ts +{ cronTime: "50 14 * * 1,2,3,4,5,7", action: this.triggerBusinessNews.bind(this), name: "Business News" } ``` - +Here 50 is the minute, 14 is the hour, and * is for every day of month and every month. 1,2,3,4,5,7 are the days of the week. --- ## Testing & Debugging diff --git a/packages/plugin-hadrien/src/hadrienClient.ts b/packages/plugin-hadrien/src/hadrienClient.ts index 8d6eb5b..ceadf6a 100644 --- a/packages/plugin-hadrien/src/hadrienClient.ts +++ b/packages/plugin-hadrien/src/hadrienClient.ts @@ -117,7 +117,7 @@ export class HadrienClient implements Client { } catch (error) { elizaLogger.error(`🚨 Error in task: ${name}`, error); } - }, { timezone: "Europe/Istanbul" }); // ✅ Adjusted to CST (Mexico City) + }, { timezone: "America/Mexico_City" }); // ✅ Adjusted to CST (Mexico City) this.cronJobs.push(job); elizaLogger.log(`✅ Scheduled: ${name} at ${cronTime} CST`); From eeff37c7494b117cb203c7f008af3b7ffe4bd974 Mon Sep 17 00:00:00 2001 From: kollegian Date: Tue, 29 Jul 2025 19:02:40 +0300 Subject: [PATCH 2/2] update cron info --- SETUP.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SETUP.md b/SETUP.md index 0294350..4fe3eba 100644 --- a/SETUP.md +++ b/SETUP.md @@ -235,7 +235,11 @@ Character files define the bot's personality, behavior, and scheduling: ### Understanding Schedules -Jobs are defined in the packages/plugin-hadrien/src/hadrienClient.ts file. There you can find the current set schedule. +Jobs are defined in the packages/plugin-hadrien/src/hadrienClient.ts file. +```ts +{ cronTime: "11 15 * * 1,2,3,4,5,6,7", action: this.triggerImageProcessingKoi.bind(this), name: "Image Processing" } +{ cronTime: "00 15 * * 7", action: this.triggerImageProcessingOnsen.bind(this), name: "Image Processing" } +``` ### Current Default Jobs @@ -254,8 +258,9 @@ Jobs are defined in the packages/plugin-hadrien/src/hadrienClient.ts file. There Remove or comment out the schedule entry: ```ts const schedules = [ - //API DATA ACTIONS // { cronTime: "50 14 * * 1,2,3,4,5,7", action: this.triggerBusinessNews.bind(this), name: "Business News" }, + { cronTime: "12 16 * * 1,2,3,4,5,7", action: this.triggerSeiAnalytics.bind(this), name: "Sei Analytics (Daily at 9 AM CST)" }, +] ``` #### To Add a New Job