Menu

CRONSPIDER™ API Task Scheduling

CRONSPIDER™ API SPEC

currently under development

{nodepath}/api/cronspider/{secret_cron_key}

The cronspider api crawls nodes by pinging all activated cron spiders for each of its sub nodes recursively via http requests to their actual api urls. The api passes any php error or status messages back in its response.

Once cronspider api has pinged all its sub nodes it then executes any php processes embedded into any current level xml (.task) files which happen to be stale (due for refresh) according to their individual frequency and/or schedule settings.

Note that processes are not guaranteed to execute on time but will execute eventually as long as both the node and the parent nodes’ cronspiderapis are activated by entering $cronspider=TRUE; into their TerraDctl_Cablebox.php front controller script code which are already FALSE by default.

The .task xml files are managed by the task scheduler application for each node. All .task files may be self deleting according to a set pruning criteria if needed.

To ensure a more precise scheduling you must create a separate cron tab on your server cPanel for each individual node cronspider api url which needs to be pinged. Otherwise nodes will be spidered and overdue or stale tasks performed in the order and pace determined by load and capacity of any incoming cronspider api pings.

All General Purposes™ Nodes™ have an internet address. For example, the address for this sample coupon node is:

Your addresses should be different. It does not matter. All node urls have the cronspider api feature available.

Let’s say that you have any kind of automated workflow happening at this node level. For example, there is .task script such as a sensor which checks that node level jsadserver impressions log every 3 minutes and sends an sms alert if there is more than a specified number of new impressions.

Too many impressions may be an indicator that an http based distributed denial of service or ddos attack is in progress on any web page where there is a JSADSERVER™ API tracking code. This is but one example of the infinite possible workflows which can be automated and tracked inside a General Purposes™ Node using this method.

Certain process such as sensors require a forced refresh of server data at a regular interval. This is accomplished by first creating what is called a CRON job or crontab on your server control panel or host cPanel . Your host support should also be able to assist with crontabs if they are any good.

An example of a server crontab command to ping a node at a regular scheduled interval is :

cPanel also has a more user friendly form for creating cron tabs. For further explanation of how to set up your cron job controls see the hosting control panel instructions at their website. Most hosts provide some way to do this yourself or will do it for you for free.