Skip to content
This repository has been archived by the owner on Jul 5, 2020. It is now read-only.

system.service()

krisdb2009 edited this page Sep 2, 2017 · 4 revisions

Details

This class allows a service to be generated and managed with its underlying methods.

A service in Webdows is a program or JS file that is run on an interval. When the JS file is ran, the service object generated from creating this class will be injected into the code that is ran.

For example, this file "test.js" will increment the "service.count" property every time the service runs on its interval.

if(typeof service.count !== 'number') {
	service.count = 0;
}
console.log(service.count++);

The code will output as shown:

Services are also useful since they are registered in the registry. So next time Webdows starts, the service will be created under the same ID, interval, and path.


Webdows Documentation Wiki

system Object

explorer Object

Clone this wiki locally