MENTDB
Data Driver & Automation - Weak & Strong AI
BACK
Running asynchronous processes
Create a new script
Click on the button add to create a new script, and modify the script like the source code below:

Source code
script create post "addition" true 1

  (param
  	(var "[v1]" {type is_double [v1]} "Number 1" is_null:true is_empty:true "12")
  	(var "[v2]" {type is_double [v2]} "Number 2" is_null:true is_empty:true "13")
  )
  "Make an addition ..."
{

	log write (concat "My message 1 ...") OK null null;
	-> "[result]" (+ [v1] [v2]);
	log write (concat "My message 2 ...") OK null null;

	[result];
	
} "Return the result of the addition";
Log write
Note the 'true' parameter of the script, it authorizes the saving of logs in the database (table logs).
Refresh the tree of script


Click on the refresh button (on DEVEL tab)
Right click on the script: 'addition.post'


By default you are connected with admin user. So, all your scripts are in admin group by default. Click on 'Stack (clipboard)'. The stack execution source code is saved into your clipboard.



Paste the MQL source code into a new programming page. And click on the play button to execute the addition.post in synchronous mode.



You receive into the MAIN OUTPUT an execution ID. When the time is right and the processors are available, your processing will be executed.
Source code
# to follow the evolution of your process ("zd" is the process id) ;
restricted show_pid "zd";
Follow in real time
Click on the refresh button of the process to see the logs in real time...