subsys-boot-init-jobs.md 60.2 KB
Newer Older
S
shawn_he 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
# Job Management
## Overview
### Function
A job is a set of commands in the **.cfg** file of the init module. A maximum of 4096 jobs can be added. Jobs can be configured in the [.cfg file](subsys-boot-init-cfg.md). Generally, jobs are executed during initialization to serve the normal startup of services or the initialization of specific basic functions.

### Basic Concepts
A job can be configured in the **init.cfg** file or the custom **.cfg** file of the module. The parser of the init process aggregates commands of the jobs with the same name into one job. For jobs with the same name, the init process only ensures that the commands in the **init.cfg** file are executed in preference. It does not guarantee the execution sequence of commands in other **.cfg** files.
- Common job

  A job executed in a fixed phase during init process startup, for example, pre-init, init, or post-init.
  - pre-init: pre-initialization phase. Key services on which other services depend, such as ueventd, watchdog, and hilogd, are started in this phase. The mounting of data partitions is also done in this phase.
  - init: main phase of the initialization process. In this phase, a large number of commands are executed, and services in the **boot** group (first group) are started concurrently by the **init** group. Some important services related to system functions are also started in this phase.
  - post-init: post-initialization phase. In this phase, the **trigger** command is used to invoke the execution of other phases, which can be regarded as independent phases, or the post-init phase as a whole. In this phase, a large number of commands are executed, and the **normal** group (the second group) is started by the **init** group. Most services configured in the **.cfg** files are started in this phase.

- Custom job (for standard system or higher)

  A job triggered based on specific rules. You can add commands to the job as required and run the **trigger** command to invoke the execution of commands in the job.

- Conditional job (for standard system or higher)

  A job triggered based on specific conditions. You can add conditions to a job so that the job is executed when the conditions are met.

  A condition is a combination of system parameter values and supports operations such as **&&** and **||**, for example, **"condition": "sys.usb.config = none && sys.usb.configfs = 0"**. When defining commands for a job, you can add attributes in the format of **param:xxx** to form different commands.

### Constraints
With the system parameter module, the standard system is able to support basic, conditional, and custom jobs. The small system supports only basic jobs.

## How to Develop
### Use Cases
A job is a command set, where you can manage the commands to be executed. A maximum of 4096 commands can be added to a command set. During the init startup process, the execution of jobs helps ensure normal running of services.

### Parameters

   **Table 1** Command set description
<table border="0" cellpadding="0" cellspacing="0" width="770" style="border-collapse: collapse;table-layout:fixed;width:578pt;border-spacing: 0px;font-variant-ligatures: normal; font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px; text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial">
            <tbody>
                <tr height="39" style="height:18.0pt">
                    <th height="24" class="xl6521952" width="140" style="height:18.0pt;width:105pt">
                        Command
                    </td>
                    <th class="xl6521952" width="215" style="border-left:none;width:161pt">
                        Format and Example
                    </td>
                    <th class="xl6521952" width="225" style="border-left:none;width:169pt">
                        Description
                    </td>
                    <th class="xl6521952" width="190" style="border-left:none;width:143pt">
                        Supported System Type
                    </td>
                </tr>
                <tr height="231" style="height:173.25pt">
                    <td height="231" class="xl6621952" width="140" style="height:173.25pt;border-top: none;width:105pt">
                        mkdir
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        mkdir&nbsp; target folder [mode] [owner] [group]<br>Example:<br>mkdir&nbsp;/storage/myDirectory<br>mkdir /storage/myDirectory 0755 root root
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Creates a folder. **mkdir** and the target folder must be separated by only one space. Folders cannot be created recursively.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="277" style="mso-height-source:userset;height:207.75pt">
                    <td height="277" class="xl6621952" width="140" style="height:207.75pt;border-top: none;width:105pt">
                        chmod
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
S
shawn_he 已提交
70
                        chmod <i>permission</i> <i>target</i><br>Example:<br>chmod 0600 /storage/myFile.txt<br>chmod 0750 /storage/myDir
S
shawn_he 已提交
71 72
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
S
shawn_he 已提交
73
                        Modifies the permission, which must be in the **0****<i>xxx</i>** format. **chmod**, <i>permission</i>, and <i>target</i> must be separated by only one space.
S
shawn_he 已提交
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="295" style="mso-height-source:userset;height:221.25pt">
                    <td height="295" class="xl6621952" width="140" style="height:221.25pt;border-top: none;width:105pt">
                        chown
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        chown uid gid *target*<br>Example:<br>chown 900 800 /storage/myDir<br>chown 100 100 /storage/myFile.txt
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Modifies the owner group. **chown**, **uid**, **gid**, and *target* must be separated by only one space.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="355" style="mso-height-source:userset;height:266.25pt">
                    <td height="355" class="xl6621952" width="140" style="height:266.25pt;border-top: none;width:105pt">
                        mount
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        mount&nbsp;fileSystemType&nbsp;src&nbsp;dst&nbsp;flags&nbsp;data<br>Example:<br>mount&nbsp;vfat&nbsp;/dev/mmcblk0&nbsp;/sdc&nbsp;rw,umask=000<br>mount&nbsp;jffs2&nbsp;/dev/mtdblock3&nbsp;/storage&nbsp;nosuid
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Mounts devices. Every two parameters must be separated by only one space. <br>For details about **flags**, see the **mountFlagMap[]** array of the **mountFlagMap** function in **base/startup/init_lite/services/init/init_common_cmds.c**. The **data** field is optional.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="238" style="mso-height-source:userset;height:178.5pt">
                    <td height="238" class="xl6621952" width="140" style="height:178.5pt;border-top: none;width:105pt">
                        start
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        start *serviceName*<br>Example:<br>start foundationstart
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Starts services. *serviceName* must be contained in the **services** array.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="264" style="mso-height-source:userset;height:198.0pt">
                    <td height="264" class="xl6621952" width="140" style="height:198.0pt;border-top: none;width:105pt">
                        export
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        export *key value*<br>Example:<br>export TEST /data/test
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Sets environment variables. **key** and **value** respectively indicate the environment variable and its value.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        rm
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        rm *filename*<br>Example:<br>rm /data/testfile
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Deletes a file. **filename** indicates the absolute file path.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        rmdir
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        rmdir *dirname*<br>Example:<br>rmdir /data/testdir
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Deletes a directory. **dirname** indicates the absolute path of the directory.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        stop
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        stop *servicename*<br>Example:<br>stop console
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Stops a service. **servicename** indicates the name of the service to stop.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="280" style="mso-height-source:userset;height:210.0pt">
                    <td height="280" class="xl6621952" width="140" style="height:210.0pt;border-top: none;width:105pt">
                        copy
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        copy *oldfile* *newfile*<br>Example:<br>copy /data/old /data/new
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Copies a file. **oldfile** and **newfile** respectively indicate the old and new absolute file paths.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="382" style="mso-height-source:userset;height:286.5pt">
                    <td height="382" class="xl6621952" width="140" style="height:286.5pt;border-top: none;width:105pt">
                        reset
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        reset *servicename*<br>Example:<br>reset console
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Resets a service. **servicename** indicates the name of the service to reset. If the service has not been started, this command will start the service. If the service is running, the command will stop the service and then restart it.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="363" style="mso-height-source:userset;height:272.25pt">
                    <td height="363" class="xl6621952" width="140" style="height:272.25pt;border-top: none;width:105pt">
                        reboot
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        reboot *subsystem*<br>Example:<br>reboot updater
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Restarts the system. <strong>subsystem</strong> is optional. If it is not specified, the device enters the current system upon restarting. If it is specified, the device enters the corresponding subsystem upon restarting. For example, if you run **reboot updater**, the device enters the updater subsystem upon restarting.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        sleep
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        sleep *time*<br>Example:<br>sleep 5
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Enters the sleep mode. <strong>time</strong> indicates the sleep time. <br>To avoid impact on services, exercise caution when running this command.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        domainname
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        domainname *name*<br>Example:<br>domainname localdomain
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Sets the domain name.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        hostname
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        hostname *name*<br>Example:<br>hostname localhost
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Sets the host name.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="116" style="height:87.0pt">
                    <td height="116" class="xl6621952" width="140" style="height:87.0pt;border-top: none;width:105pt">
                        wait
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        wait *filepath*<br>Example:<br>wait /data/testfile or wait /data/testfile 5
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Waits for commands. The waiting time must not exceed 5 seconds.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        setrlimit
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        setrlimit resource *curValue* *maxValue*<br>Example:<br>setrlimit RLIMIT_CPU 10 100
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Sets resource usage restrictions. <br>For details, see the **resource[]** array of the **DoSetrlimit** function in **base/startup/init_lite/services/init/init_common_cmds.c**.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="228" style="mso-height-source:userset;height:171.0pt">
                    <td height="228" class="xl6621952" width="140" style="height:171.0pt;border-top: none;width:105pt">
                        exec
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        exec *Path of the executable file* *Parameters passed by the executable file*<br>Example:<br>exec /system/bin/udevadm trigger
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Runs an executable file. The command must not contain more than 10 parameters.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="231" style="height:173.25pt">
                    <td height="231" class="xl6621952" width="140" style="height:173.25pt;border-top: none;width:105pt">
                        mknode
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        mknod name { b | c } *Major* *Minor*<br>Example:<br>mknod path b 0644 1 9
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Creates an index node corresponding to a directory entry and a special file.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        makedev
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        makedev *major* *minor*<br>Example:<br>makedev -v update
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Creates a static device node, which is usually in the **/dev** directory.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="231" style="height:173.25pt">
                    <td height="231" class="xl6621952" width="140" style="height:173.25pt;border-top: none;width:105pt">
                        symlink
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        symlink target link_name<br>Example<br>symlink /proc/self/fd/0 /dev/stdin
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Creates a symbolic link.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="139" style="height:104.25pt">
                    <td height="139" class="xl6621952" width="140" style="height:104.25pt;border-top: none;width:105pt">
                        trigger
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        trigger *jobName*<br>Example<br>trigger early-fs
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Triggers a job.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="116" style="height:87.0pt">
                    <td height="116" class="xl6621952" width="140" style="height:87.0pt;border-top: none;width:105pt">
                        insmod
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        insmod <ko name> [-f] [options]<br>Example<br>insmod xxx.ko
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Loads a kernel module file.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="277" style="height:207.75pt">
                    <td height="277" class="xl6621952" width="140" style="height:207.75pt;border-top: none;width:105pt">
                        setparam
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        setparam *paramname* *paramvalue*<br>Example:<br>setparam sys.usb.config hdc
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Sets system parameters.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="231" style="height:173.25pt">
                    <td height="231" class="xl6621952" width="140" style="height:173.25pt;border-top: none;width:105pt">
                        load_persist_params
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        load persist params<br>Example:<br>load_persist_params&nbsp;
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Loads **persist** parameters. There must be one and only one space after the **load_persist_params** command.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="208" style="height:156.0pt">
                    <td height="208" class="xl6621952" width="140" style="height:156.0pt;border-top: none;width:105pt">
                        load_param
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        load *params*<br>Example:<br>load_param /data/test.normal.para
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Loads the parameters from a file to the memory.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="278" style="mso-height-source:userset;height:208.5pt">
                    <td height="278" class="xl6621952" width="140" style="height:208.5pt;border-top: none;width:105pt">
                        load_access_token_id
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        load_access_token_id&nbsp;
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Writes the access token to the **data/service/el0/access_token/nativetoken.json** file. There is one and only one space after **load_access_token_id**.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="139" style="height:104.25pt">
                    <td height="139" class="xl6621952" width="140" style="height:104.25pt;border-top: none;width:105pt">
                        ifup
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        ifup *NIC*<br>Example:<br>ifup eth0
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Activates the specified NIC.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="208" style="height:156.0pt">
                    <td height="208" class="xl6621952" width="140" style="height:156.0pt;border-top: none;width:105pt">
                        mount_fstab
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        mount_fstab fstab.test<br>Example:<br>mount_fstab /vendor/etc/fstab.test
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Mounts partitions based on the **fstab** file.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="208" style="height:156.0pt">
                    <td height="208" class="xl6621952" width="140" style="height:156.0pt;border-top: none;width:105pt">
                        umount_fstab
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        umount_fstab fstab.test<br>Example:<br>umount_fstab /vendor/etc/fstab.test
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Unmounts partitions based on the **fstab** file.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="162" style="height:121.5pt">
                    <td height="162" class="xl6621952" width="140" style="height:121.5pt;border-top: none;width:105pt">
                        restorecon
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        restorecon *file or dir*<br>Example:<br>restorecon /file
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Reloads the SELinux context.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="254" style="height:190.5pt">
                    <td height="254" class="xl6621952" width="140" style="height:190.5pt;border-top: none;width:105pt">
                        stopAllServices
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        stopAllServices [bool]<br>Example:<br>stopAllServices false<br>stopAllServices
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Stops all services.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="162" style="height:121.5pt">
                    <td height="162" class="xl6621952" width="140" style="height:121.5pt;border-top: none;width:105pt">
                        umount
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        umount *path*<br>Example:<br>umount /vendor
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Unmounts a mounted device.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        sync
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        sync&nbsp;
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Writes data to the disk synchronously. There is only one and only one space after **sync**.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        timer_start
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        timer_start *serviceName*<br>Example:<br>timer_start console
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Starts the service timer.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="185" style="height:138.75pt">
                    <td height="185" class="xl6621952" width="140" style="height:138.75pt;border-top: none;width:105pt">
                        timer_stop
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        timer_stop *serviceName*<br>Example:<br>timer_stop console
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Stops the service timer.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="162" style="height:121.5pt">
                    <td height="162" class="xl6621952" width="140" style="height:121.5pt;border-top: none;width:105pt">
                        init_global_key
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        init_global_key *path*<br>Example:<br>init_global_key /data
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Initializes the encryption key of the data partition file.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="70" style="height:52.5pt">
                    <td height="70" class="xl6621952" width="140" style="height:52.5pt;border-top:none; width:105pt">
                        init_main_user
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        init_main_user
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Encrypts the main user directory.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="162" style="height:121.5pt">
                    <td height="162" class="xl6621952" width="140" style="height:121.5pt;border-top: none;width:105pt">
                        mkswap
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        mkswap *file*<br>Example:<br>mkswap /swapfile1
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Creates a swap partition on a file or device.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="162" style="height:121.5pt">
                    <td height="162" class="xl6621952" width="140" style="height:121.5pt;border-top: none;width:105pt">
                        swapon
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        swapon *file*<br>Example:<br>swapon /swapfile1
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Activates the swap space. 
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="162" style="height:121.5pt">
                    <td height="162" class="xl6621952" width="140" style="height:121.5pt;border-top: none;width:105pt">
                        mksandbox
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        mksandbox *fileName*<br>Example:<br>mksandbox system
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Creates a sandbox.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Standard system
                    </td>
                </tr>
                <tr height="384" style="mso-height-source:userset;height:288.0pt">
                    <td height="384" class="xl6621952" width="140" style="height:288.0pt;border-top: none;width:105pt">
                        loadcfg
                    </td>
                    <td class="xl6621952" width="215" style="border-top:none;border-left:none; width:161pt">
                        loadcfg&nbsp;filePath<br>Example:<br>loadcfg&nbsp;/patch/fstab.cfg
                    </td>
                    <td class="xl6621952" width="225" style="border-top:none;border-left:none; width:169pt">
                        Loads other **.cfg** files. The maximum size of the target file (only **/patch/fstab.cfg** supported currently) is 50 KB. Each line in the /patch/fstab.cfg file is a command. The command types and formats must comply with their respective requirements mentioned in this table. A maximum of 20 commands are allowed.
                    </td>
                    <td class="xl6621952" width="190" style="border-top:none;border-left:none; width:143pt">
                        Small system
                    </td>
                </tr><!--[endif]-->
            </tbody>
    </table>

### Available APIs
Job management is a part of the init startup process. It is a process-based function that completely serves the init startup process. It does not provide any functional APIs for other modules. It works in a way similar to command group management and does not provide help for other types of management. The following describes the job management APIs.

**Table 2** Description of job parsing APIs
<table border="0" cellpadding="0" cellspacing="0" width="968" style="border-collapse: collapse;table-layout:fixed;width:727pt;orphans: 2;widows: 2;-webkit-text-stroke-width: 0px; text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial; box-sizing: border-box;border-spacing: 0px;word-break:initial;font-variant-ligatures: normal; font-variant-caps: normal">
            <tbody>
                <tr height="39" style="height:29.25pt;box-sizing: border-box">
                    <th height="39" class="xl6320252" width="249" style="height:29.25pt;width:187pt">
                        API
                    </th>
                    <th class="xl6420252" width="235" style="width:176pt;border-image: initial">
                        Input Parameter
                    </th>
                    <th class="xl6420252" width="106" style="width:80pt;border-image: initial">
                        Return Value
                    </th>
                    <th class="xl6420252" width="200" style="width:150pt;border-image: initial">
                        Description
                    </th>
                    <th class="xl6520252" width="170" style="width:134pt;border-image: initial">
                        Supported System Type
                    </th>
                </tr>
                <tr height="99" style="mso-height-source:userset;height:74.25pt;box-sizing: border-box">
                    <td height="99" class="xl6620252" width="249" style="height:74.25pt;width:187pt; border-image: initial;box-sizing: border-box">
                        void ParseAllJobs(const cJSON *fileRoot)
                    </td>
                    <td class="xl6720252" width="235" style="width:176pt;border-image: initial; box-sizing: border-box">
                        const cJSON *fileRoot
                    </td>
                    <td class="xl6720252" width="106" style="width:80pt;border-image: initial; box-sizing: border-box">
                        void
                    </td>
                    <td class="xl6720252" width="200" style="width:150pt;border-image: initial; box-sizing: border-box">
                        Provides the general entry for parsing jobs.
                    </td>
                    <td class="xl6720252" width="170" style="width:134pt;border-image: initial; box-sizing: border-box">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="147" style="mso-height-source:userset;height:110.25pt;box-sizing: border-box">
                    <td height="147" class="xl6820252" width="249" style="height:110.25pt;width:187pt; border-image: initial;box-sizing: border-box">
                        static void ParseJob(const cJSON <span style="mso-spacerun:yes">&nbsp;</span>*jobItem, Job *resJob)
                    </td>
                    <td class="xl6920252" width="235" style="width:176pt;border-image: initial; box-sizing: border-box">
                        const cJSON *jobItem, Job *resJob
                    </td>
                    <td class="xl6920252" width="106" style="width:80pt;border-image: initial; box-sizing: border-box">
                        void
                    </td>
                    <td class="xl7020252" width="200" style="width:150pt;border-image: initial; box-sizing: border-box">
                        Checks whether a job exists and parses **cmds** in it.
                    </td>
                    <td class="xl6920252" width="170" style="width:134pt;border-image: initial; box-sizing: border-box">
                        Small system
                    </td>
                </tr>
                <tr height="177" style="mso-height-source:userset;height:132.75pt;box-sizing: border-box">
                    <td height="177" class="xl6620252" width="249" style="height:132.75pt;width:187pt; border-image: initial;box-sizing: border-box">
                        int GetCmdLinesFromJson(const cJSON *root, CmdLines **cmdLines)
                    </td>
                    <td class="xl6720252" width="235" style="width:176pt;border-image: initial; box-sizing: border-box">
                        const cJSON *root, CmdLines **cmdLines
                    </td>
                    <td class="xl6720252" width="106" style="width:80pt;border-image: initial; box-sizing: border-box">
                        int
                    </td>
                    <td class="xl6720252" width="200" style="width:150pt">
                        Parses **cmds** in the job. This API is used for the small system. It does not apply to the standard system because the **trigger** command and **condition** attribute are involved.
                    </td>
                    <td class="xl6720252" width="170" style="width:134pt;border-image: initial; box-sizing: border-box">
                        Small and standard systems
                    </td>
                </tr>
                <tr height="171" style="mso-height-source:userset;height:128.25pt;box-sizing: border-box">
                    <td height="171" class="xl6820252" width="249" style="height:128.25pt;width:187pt; border-image: initial;box-sizing: border-box">
                        int ParseTriggerConfig(const cJSON *fileRoot, int (*checkJobValid)(const char *jobName))
                    </td>
                    <td class="xl6920252" width="235" style="width:176pt;border-image: initial; box-sizing: border-box">
                        const cJSON *fileRoot, int (*checkJobValid)(const char *jobName)
                    </td>
                    <td class="xl6920252" width="106" style="width:80pt;border-image: initial; box-sizing: border-box">
                        int
                    </td>
                    <td class="xl6920252" width="200" style="width:150pt;border-image: initial; box-sizing: border-box">
                        Parses the **Trigger** command in the job.
                    </td>
                    <td class="xl6920252" width="170" style="width:134pt;border-image: initial; box-sizing: border-box">
                        Standard system
                    </td>
                </tr>
                <tr height="210" style="mso-height-source:userset;height:157.5pt;box-sizing: border-box">
                    <td height="210" class="xl6620252" width="249" style="height:157.5pt;width:187pt; border-image: initial;box-sizing: border-box">
                        static int ParseTrigger_(const TriggerWorkSpace *workSpace, const cJSON *triggerItem, int (*checkJobValid)(const char *jobName))
                    </td>
                    <td class="xl6720252" width="235" style="width:176pt;border-image: initial; box-sizing: border-box">
                        const TriggerWorkSpace *workSpace, const cJSON *triggerItem, int (*checkJobValid)(const char *jobName)
                    </td>
                    <td class="xl6720252" width="106" style="width:80pt;border-image: initial; box-sizing: border-box">
                        int
                    </td>
                    <td class="xl6720252" width="200" style="width:150pt">
                        Obtains the job name, condition attribute, and **cmds** command group. Jobs are stored in a hash table, and commands are stored in a queue structure.
                    </td>
                    <td class="xl6720252" width="170" style="width:134pt;border-image: initial; box-sizing: border-box">
                        Standard system
                    </td>
                </tr><!--[endif]-->
            </tbody>
    </table>

**Table 3** Description of the job triggering APIs
<table border="0" cellpadding="0" cellspacing="0" width="906" style="border-collapse: collapse;table-layout:fixed;width:681pt;box-sizing: border-box;border-spacing: 0px; word-break:initial;font-variant-ligatures: normal;font-variant-caps: normal; orphans: 2;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial; text-decoration-style: initial;text-decoration-color: initial">
            <tbody>
                <tr height="39" style="height:35.25pt;box-sizing: border-box">
                    <th height="47" class="xl6322245" width="239" style="height:35.25pt;width:153pt">
                        API
                    </th>
                    <th class="xl6322245" width="235" style="border-left:none;width:178pt">
                        Input Parameter
                    </th>
                    <th class="xl6322245" width="106" style="border-left:none;width:80pt">
                        Return Value
                    </th>
                    <th class="xl6322245" width="200" style="border-left:none;width:128pt">
                        Description
                    </th>
                    <th class="xl6322245" width="170" style="border-left:none;width:133pt">
                        Supported System Type
                    </th>
                </tr>
                <tr height="257" style="mso-height-source:userset;height:192.75pt;box-sizing: border-box">
                    <td height="257" class="xl6422245" width="204" style="height:192.75pt;border-top: none;width:153pt;box-sizing: border-box">
                        void PostTrigger(EventType type, const char *content, uint32_t contentLen)
                    </td>
                    <td class="xl6422245" width="235" style="border-top:none;border-left:none; width:178pt;box-sizing: border-box">
                        EventType type, const char *content, uint32_t contentLen
                    </td>
                    <td class="xl6422245" width="106" style="border-top:none;border-left:none; width:80pt;box-sizing: border-box">
                        void
                    </td>
                    <td class="xl6422245" width="170" style="border-top:none;border-left:none; width:128pt;box-sizing: border-box">
                        Verifies the validity of the job name and sends a job triggering event.
                    </td>
                    <td class="xl6422245" width="170" style="border-top:none;border-left:none; width:133pt;box-sizing: border-box">
                        Standard system
                    </td>
                </tr>
                <tr height="323" style="height:242.25pt;box-sizing: border-box">
                    <td height="323" class="xl6522245" width="204" style="height:242.25pt;border-top: none;width:153pt;box-sizing: border-box">
                        static void SendTriggerEvent(int type, const char *content, uint32_t contentLen)
                    </td>
                    <td class="xl6522245" width="235" style="border-top:none;border-left:none; width:178pt;box-sizing: border-box">
                        int type, const char *content, uint32_t contentLen
                    </td>
                    <td class="xl6522245" width="106" style="border-top:none;border-left:none; width:80pt;box-sizing: border-box">
                        void
                    </td>
                    <td class="xl6522245" width="170" style="border-top:none;border-left:none; width:128pt;box-sizing: border-box">
                        Performs functions such as system control and starting or stopping of services based on system parameters.
                    </td>
                    <td class="xl6522245" width="170" style="border-top:none;border-left:none; width:133pt;box-sizing: border-box">
                        Standard system
                    </td>
                </tr>
                <tr height="188" style="mso-height-source:userset;height:141.0pt;box-sizing: border-box">
                    <td height="188" class="xl6422245" width="204" style="height:141.0pt;border-top: none;width:153pt;box-sizing: border-box">
                        static void DoTriggerCmd(const struct CmdArgs *ctx)
                    </td>
                    <td class="xl6422245" width="235" style="border-top:none;border-left:none; width:178pt;box-sizing: border-box">
                        const struct CmdArgs *ctx
                    </td>
                    <td class="xl6422245" width="106" style="border-top:none;border-left:none; width:80pt;box-sizing: border-box">
                        void
                    </td>
                    <td class="xl6422245" width="170" style="border-top:none;border-left:none; width:128pt;box-sizing: border-box">
                        Executes the **trigger** command.
                    </td>
                    <td class="xl6422245" width="170" style="border-top:none;border-left:none; width:133pt;box-sizing: border-box">
                        Standard system
                    </td>
                </tr>
                <tr height="258" style="mso-height-source:userset;height:193.5pt;box-sizing: border-box">
                    <td height="258" class="xl6522245" width="204" style="height:193.5pt;border-top: none;width:153pt;box-sizing: border-box">
                        void DoTriggerExec(const char *triggerName)
                    </td>
                    <td class="xl6522245" width="235" style="border-top:none;border-left:none; width:178pt;box-sizing: border-box">
                        const char *triggerName
                    </td>
                    <td class="xl6522245" width="106" style="border-top:none;border-left:none; width:80pt;box-sizing: border-box">
                        void
                    </td>
                    <td class="xl6522245" width="170" style="border-top:none;border-left:none; width:128pt;box-sizing: border-box">
                        Finds a command group based on the job name and pushes the commands in the command group to the execution queue. This API is available only for the standard system. 
                    </td>
                    <td class="xl6522245" width="170" style="border-top:none;border-left:none; width:133pt;box-sizing: border-box">
                        Standard system
                    </td>
                </tr>
                <tr height="254" style="height:190.5pt;box-sizing: border-box">
                    <td height="254" class="xl6422245" width="204" style="height:190.5pt;border-top: none;width:153pt;box-sizing: border-box">
                        void DoJob(const char *jobName)
                    </td>
                    <td class="xl6422245" width="235" style="border-top:none;border-left:none; width:178pt;box-sizing: border-box">
                        const char *jobName
                    </td>
                    <td class="xl6422245" width="118" style="border-top:none;border-left:none; width:80pt;box-sizing: border-box">
                        void
                    </td>
                    <td class="xl6422245" width="170" style="border-top:none;border-left:none; width:128pt;box-sizing: border-box">
                        Matches a job based on the job name and invokes **DoCmdByIndex** to execute the commands in the job.
                    </td>
                    <td class="xl6422245" width="170" style="border-top:none;border-left:none; width:133pt;box-sizing: border-box">
                        Small system
                    </td>
                </tr>
                <tr height="208" style="height:156.0pt;box-sizing: border-box">
                    <td height="208" class="xl6522245" width="204" style="height:156.0pt;border-top: none;width:153pt;box-sizing: border-box">
                        void DoCmdByIndex(int index, const char *cmdContent)
                    </td>
                    <td class="xl6522245" width="235" style="border-top:none;border-left:none; width:178pt;box-sizing: border-box">
                        int index, const char *cmdContent
                    </td>
                    <td class="xl6522245" width="118" style="border-top:none;border-left:none; width:80pt;box-sizing: border-box">
                        void
                    </td>
                    <td class="xl6522245" width="170" style="border-top:none;border-left:none; width:128pt;box-sizing: border-box">
                        Combines parameters and commands.
                    </td>
                    <td class="xl6522245" width="170" style="border-top:none;border-left:none; width:133pt;box-sizing: border-box">
                        Small and standard systems
                    </td>
                </tr><!--[endif]-->
            </tbody>
    </table>

### Development Example
The following is the template for configuring **jobs** in the **.cfg** file. You can use it to verify the job management function.
```
{
    "jobs" : [{     // Basic job
            "name" : "stage1",
            "cmds" : [
                "start service1",
                "mkdir dir1"
            ]
        }, {        // Conditional job
            "name" : "param:test.name1=0",
            "condition" : "test.name1=0",
            "cmds" : [
                "chmod 0755 dir1",
                "chown root root dir1"
            ]
        }, {        // Custom job
            "name" : "param:test.name2=*",
            "condition" : "test.name2=*",
            "cmds" : [
                "chmod 0644 dir1",
                "chown system system dir1"
            ]
        }
    ]
}
```
The differences in job configuration are described as follows:

1. **name** and **cmds** are mandatory for a job, and **cmds** must contain commands supported by the system.

2. **condition** is an optional attribute of a job. It indicates that the job is triggered only when the specified condition is met; that is, the job will not be invoked in a specific phase by the code or the **trigger** command.

3. The job name must comply with the specified rules. For a job whose condition is a system parameter, its name is prefixed with **param:**.

4. Commands in a renamed job can be executed only after being triggered by the **trigger** command in other executable job command groups. By default, the **trigger** command is executed in the post-init phase.

5. An existing job name can be used in different files. Jobs with the same name are regarded as the same job. When jobs with the same name are executed, the commands in these jobs are executed together.

6. For a conditional job, a condition is usually a system parameter. You can set a specific value so that the job is triggered when the condition is met. You can also set the value to an asterisk (*) so that the job is triggered whenever the condition is met, regardless of the parameter value.

7. For the small system, the commands in a job cannot be triggered by the **trigger** command in the post-init phase.