User Tools

Site Tools


gen:automated_admin_tasks

This is an old revision of the document!


Automated/Admin Tasks

With N99panel you can have certain tasks treated as automated/admin tasks whereby your normal scripts in a VHost/Website can submit and track tasks.

Firstly you need to enable Admin Tasks for a certain user. This you can do from N99panel Dashboard → List Users . Only a single user can have the Admin Tasks enabled for itself. Once you have enabled the Admin Tasks, you need to do the following w.r.t. task submission and management.

Under the user (which has been enabled for admin tasks), create the folder /home/user/admin_tasks , if it is not already created . Substitute user for the admin task user

Under the folder /home/user/admin_tasks , following sub-folders are involved

new_tasks - If it is not present, you will need to create it at your end. Here you would place the requisite JSON file with a .json extension which contains the task details . The JSON file should begin with a number preferably a timestamp . Example of a valid JSON filename is 1744610599.json . Each JSON file contains a single task. The typical fomat of a JSON file is

{
    "task":"__TASK_NAME__",
    "params":{
        "__PARAM1__":"__VALUE1__" ,
        "__PARAM2__":"__VALUE2__" ,
    }
}

Click this link to checkout various available JSON calls

The system checks for new tasks every minute, and the moves those tasks to the current_tasks folder before executing the task.

current_tasks - This is a system created folder to manage the task state. When a task is to be executed, the system places it in this folder. When the execution is done, the task is then moved to either handled_tasks or discarded_tasks depending upon whether its execution was successful or not

gen/automated_admin_tasks.1744786999.txt.gz · Last modified: 2025/04/16 07:03 by kirtisingh

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki