Oct 28, 2020
Execute Skript
The Execute Skript section of the web panel allows users to send skripts to workers. A worker is a NodeJS software program that executes skripts written in JavaScript. When the worker runs the skript, it performs the specified functions and returns results.
The worker sends echo messages back to the web panel, providing log, error, and warning messages using the @mikosoft/echo npm library. If the skript extracts data, the worker stores the extracted data in a database for future access.
Single Worker
"Single Worker" is a skript execution strategy where one skript is sent to one worker for execution.

This strategy is straightforward and effective for small and simple skripts. It ensures precise control over execution and provides real-time updates.
Multi Worker
"Multi Worker" is an execution strategy that distributes skripts to multiple workers simultaneously.
This method increases data extraction capacity by dividing tasks among multiple workers. It enhances efficiency, especially for large-scale data scraping and automation tasks, improving speed and performance.
Multi Worker execution is ideal for extracting data from websites, APIs, and databases in parallel, making it invaluable for organizations dealing with large-scale data operations.
Skript Execution Controls
Users can manage skript execution with the following controls:
- Start: Begins skript execution.
- Stop: Terminates execution immediately.
- Pause: Temporarily halts execution.
- Resume: Continues execution from the paused state.
These controls allow flexibility in managing skripts, optimizing resource usage, and ensuring accuracy.
Skript Execution Information
The "Skript Execution" table provides a real-time overview of execution status:
- Start: Execution has begun.
- Stop: Execution was terminated.
- Pause: Execution is temporarily halted.
- End: Skript successfully completed.
- Error: An issue occurred during execution.

Echoes
Echoes provide real-time logs from the worker, transmitted as WebSocket messages.

Worker Answer
The worker answer is a response object from the worker's API endpoint POST /execute-skript/start, containing the final result of the skript execution, which can be the output value from the main.js function or an error message.
