Mintcoin cron.php

From MintCoin
Jump to: navigation, search

{{#seo: |title= What is JSON-RPC – MintCoin Wiki |keywords=python json rpc,json rpc problem,what is json rpc,json rpc java,how to use json rpc,json rpc example python,node js json rpc,java json rpc example |description=JSON-RPC is a remote procedure call Protocol that uses JSON to encode messages. }}

cron script[edit]

mintcoin_cron: You should execute this script from command line on your server. You have to do it as CRON job. To be possible, your hosting provider has to provide this service. Check the documentation of your hosting provider for more information about how to create CRON jobs.

location: Put the script in the "/cli" folder of the installation.

Execution: You should execute the script in the following ways. When you do it, the system will load "crowdfundingcron" plugins and will evoke one of their events.


Parameters:

--notify --context=updates

--update

--execute


Result: information about the node and network

Command:

php -q /...path_to_platform.../cli/mintcoin_cron.php --notify --context=updates

php -q /...path_to_platform.../cli/mintcoin_cron.php --update

php -q /...path_to_platform.../cli/mintcoin_cron.php --execute


There are three options that set the type of actions that will perform the script:

--notify - this should be used when you would like to handle an event "onCronNotify".

--update - this should be used when you would like to handle an event "onCronUpdate".

--execute - this should be used when you would like to handle an event "onCronExecute".

There is an option "--context=" that you should use to check whether you are in the desired context for the plugin.

For example:

// This line will evoke the method onCronNotify with context "com_crowdfunding.cron.notify.updates".

php -q /...path_to_website.../cli/crowdfunding_cron.php --notify --context=updates

result[edit]

event not found


 {
   "version" : "v2.1.0",
   "protocolversion" : 60008,
   "walletversion" : 60000,
   "balance" : 0.00000000,
   "newmint" : 0.00000000,
   "stake" : 0.00000000,
   "blocks" : 4727057,
   "moneysupply" : 25091535966.05334473,
   "connections" : 4,
   "proxy" : "",
   "ip" : "209.25.55.143",
   "difficulty" : 0.76501488,
   "testnet" : false,
   "keypoololdest" : 1538479191,
   "keypoolsize" : 102,
   "paytxfee" : 0.10000000,
   "errors" : ""

}

References[edit]


Template:MintCoin Platform documentation