Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .env.example.full
Original file line number Diff line number Diff line change
Expand Up @@ -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=
51 changes: 16 additions & 35 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-hadrien/src/hadrienClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down