edit

edit($num_task,$path,$type=0,$date="",$time="",$count=-1,$active=true,$comments="",$add_params=""); - change the task data with the specified number in the script schedule

The function accepts parameters as input:

  • $num_task – task number
  • $path – new path to the script being executed
  • $type – new task type :

  • $date – date - format system - for example 07/03/15
  • $time – time - format system - for example 08:01:02
  • $count – the new number of launches
  • $active – new activity tasks
  • $comments – comments
  • $add_params – additional information to the task selection - after how many minutes to run zaadchu (available from 4.10.6)

    After testing, the function returns the result of its work to the script :
  • true – completed successfully
  • true – failed

    PHP example: window->".basename(__FILE__)."
    "; //1 echo "1.Get the zero problem:"; echo $scheduler->get(0, $path, $type, $date, $time, $count, $active, $comments, $add_param)."
    "; //2 echo "2.Let's edit the zero problem:"; $next_time = date("H: i: s", time() + 200); $new_date = date("Y-m-d"); $add_param = 15; echo $scheduler->edit(0, $path, $type, $new_date, $next_time, $count, true, $comments, $add_param); //$app->restart('', '', $app->get_port()); //end echo "

    "; //Quit $app->quit(); ?>
    Python example: # Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:7010" from xweb_human_emulator import * # Start echo("
    scheduler.xxxxxxxxx
    ") # 1 echo("1.Get the zero problem:") path, type, date, time, count, active, comments, add_param = scheduler.get(0) echo(scheduler.get(0), "
    ") # 2 echo("2.Let's edit the zero problem:") add_param = 15 comments = comments + "edited" echo(scheduler.edit(0, path, type, date, time, count, true, comments, add_param)) # app.restart('', '', app.get_port())) # end echo("

    ") # Quit app.quit()
    C# example: #region using using System; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Threading; using XHE; using XHE.XHE_DOM; using XHE.XHE_System; using XHE.XHE_Window; using XHE.XHE_Web; #endregion class Program: XHEScript { static void Main(string [] args) { //init XHE server = "127.0.0.1:7015"; InitXHE(); //Start echo("
    scheduler.clear_tab_content
    "); //1 step echo("1.Let's edit the zero problem:"); echo(scheduler.edit(0, "test 0.php", 0, "2015.07.10", "10: 2: 3", - 1, true, "task 10")); //end echo("

    "); app.quit(); } }
    Java Script example: //connect the object to control the emulator, if not already connected xhe_host = "127.0.0.1:7011"; echo = require("../../../Templates JS/xweb_human_emulator.js"); //Start echo("
    window.edit
    "); //1 step echo("1.Get the zero problem:"); var task = new Array(7); echo(scheduler.get(0, task) + "
    "); //get from the array - task data var path_, type, date, time, count, active, comments; path_ = task [0]; type = task [1]; date = task [2]; time = task [3]; count = task [4]; active = task [5]; comments = task [6]; //display task data echo("path =" + path_); echo(" ntype =" + type); echo(" ndate =" + date); echo(" ntime =" + time); echo(" ncount =" + count); echo(" nactive =" + active); echo(" ncomments =" + comments); //step 2 echo(" n2.Let's edit the zero problem:"); var timeInMs = new Date(Date.now() + 900000);//now + 90 second var new_date = timeInMs.getFullYear() + "-" + timeInMs.getDate() + "-" + timeInMs.getMonth(); var new_time = timeInMs.getHours() + ":" + timeInMs.getMinutes() + ":" + timeInMs.getSeconds(); console.log(new_date); console.log(new_time); echo(scheduler.edit(0, "path", "type", new_date, new_time, count, false, "comments")); //end echo("

    "); //Quit app.quit();