Cron Generation

Executes scheduled functions

Overview

The function transforms the schedule into node_cron files, ensuring that all tasks are scheduled accurately. It then performs an axios request to schedule the functions. This axios request is crucial in triggering the agents, who carry out their tasks as expected according to the predefined schedule.

Node_cron files are integral in setting up the timing for these functions, making sure they run at the right moments. The axios request plays a pivotal role in this process as it communicates with the scheduler to activate the agent's functions accordingly.

In summary, the entire procedure ensures that the scheduled tasks are converted into node_cron files and the axios request mobilizes the agents, ensuring the process flows seamlessly and as planned.

Parameters

Name
Type
Required
Description

request

object

The tool generated in System Analysis

host

string

The data example or parameters for your function to work

api_key

string

the endpoint for the graphql api to run

api_secret

string

The error list for the code to catch

schedule

string

The cron request

Prompt Example

request = { "type": "function", "name": "create_post", "description": "creates a new post in the posts collection and returns the id", "return": "post_id", "params": ["title", "content"] }
host= "my_app.uncodie.com"
api_key= "ASFD29E9FVASF92AOIJFVNAPI22FASF"
api_secret= "AS9DSFI9IFJAOIJVNAPOEJO232UFASÑLV"
schedule="All fridays at 10pm"

Response Object

Name
Type
Description

code

array

The generated code

Result Example

Last updated

Was this helpful?