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..4fe3eba 100644 --- a/SETUP.md +++ b/SETUP.md @@ -235,18 +235,10 @@ 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. +```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 @@ -264,35 +256,24 @@ 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 = [ + // { 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 -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`);