|
1 | 1 | { |
2 | 2 | "cells": [ |
3 | 3 | { |
| 4 | + "attachments": {}, |
4 | 5 | "cell_type": "markdown", |
5 | 6 | "metadata": {}, |
6 | 7 | "source": [ |
|
17 | 18 | ] |
18 | 19 | }, |
19 | 20 | { |
| 21 | + "attachments": {}, |
20 | 22 | "cell_type": "markdown", |
21 | 23 | "metadata": {}, |
22 | 24 | "source": [ |
|
97 | 99 | ] |
98 | 100 | }, |
99 | 101 | { |
| 102 | + "attachments": {}, |
100 | 103 | "cell_type": "markdown", |
101 | 104 | "metadata": {}, |
102 | 105 | "source": [ |
|
203 | 206 | ] |
204 | 207 | }, |
205 | 208 | { |
| 209 | + "attachments": {}, |
206 | 210 | "cell_type": "markdown", |
207 | 211 | "metadata": {}, |
208 | 212 | "source": [ |
|
214 | 218 | ] |
215 | 219 | }, |
216 | 220 | { |
| 221 | + "attachments": {}, |
217 | 222 | "cell_type": "markdown", |
218 | 223 | "metadata": {}, |
219 | 224 | "source": [ |
|
243 | 248 | ] |
244 | 249 | }, |
245 | 250 | { |
| 251 | + "attachments": {}, |
246 | 252 | "cell_type": "markdown", |
247 | 253 | "metadata": {}, |
248 | 254 | "source": [ |
|
266 | 272 | ] |
267 | 273 | }, |
268 | 274 | { |
| 275 | + "attachments": {}, |
269 | 276 | "cell_type": "markdown", |
270 | 277 | "metadata": {}, |
271 | 278 | "source": [ |
|
289 | 296 | ] |
290 | 297 | }, |
291 | 298 | { |
| 299 | + "attachments": {}, |
292 | 300 | "cell_type": "markdown", |
293 | 301 | "metadata": {}, |
294 | 302 | "source": [ |
|
311 | 319 | ] |
312 | 320 | }, |
313 | 321 | { |
| 322 | + "attachments": {}, |
314 | 323 | "cell_type": "markdown", |
315 | 324 | "metadata": {}, |
316 | 325 | "source": [ |
|
333 | 342 | ] |
334 | 343 | }, |
335 | 344 | { |
| 345 | + "attachments": {}, |
336 | 346 | "cell_type": "markdown", |
337 | 347 | "metadata": {}, |
338 | 348 | "source": [ |
|
356 | 366 | ] |
357 | 367 | }, |
358 | 368 | { |
| 369 | + "attachments": {}, |
359 | 370 | "cell_type": "markdown", |
360 | 371 | "metadata": {}, |
361 | 372 | "source": [ |
|
380 | 391 | ] |
381 | 392 | }, |
382 | 393 | { |
| 394 | + "attachments": {}, |
383 | 395 | "cell_type": "markdown", |
384 | 396 | "metadata": {}, |
385 | 397 | "source": [ |
|
436 | 448 | ] |
437 | 449 | }, |
438 | 450 | { |
| 451 | + "attachments": {}, |
439 | 452 | "cell_type": "markdown", |
440 | 453 | "metadata": {}, |
441 | 454 | "source": [ |
|
447 | 460 | ] |
448 | 461 | }, |
449 | 462 | { |
| 463 | + "attachments": {}, |
450 | 464 | "cell_type": "markdown", |
451 | 465 | "metadata": {}, |
452 | 466 | "source": [ |
|
482 | 496 | ] |
483 | 497 | }, |
484 | 498 | { |
| 499 | + "attachments": {}, |
485 | 500 | "cell_type": "markdown", |
486 | 501 | "metadata": {}, |
487 | 502 | "source": [ |
|
500 | 515 | ] |
501 | 516 | }, |
502 | 517 | { |
| 518 | + "attachments": {}, |
503 | 519 | "cell_type": "markdown", |
504 | 520 | "metadata": {}, |
505 | 521 | "source": [ |
|
518 | 534 | ] |
519 | 535 | }, |
520 | 536 | { |
| 537 | + "attachments": {}, |
521 | 538 | "cell_type": "markdown", |
522 | 539 | "metadata": {}, |
523 | 540 | "source": [ |
|
536 | 553 | ] |
537 | 554 | }, |
538 | 555 | { |
| 556 | + "attachments": {}, |
539 | 557 | "cell_type": "markdown", |
540 | 558 | "metadata": {}, |
541 | 559 | "source": [ |
|
554 | 572 | ] |
555 | 573 | }, |
556 | 574 | { |
| 575 | + "attachments": {}, |
557 | 576 | "cell_type": "markdown", |
558 | 577 | "metadata": {}, |
559 | 578 | "source": [ |
|
572 | 591 | ] |
573 | 592 | }, |
574 | 593 | { |
| 594 | + "attachments": {}, |
575 | 595 | "cell_type": "markdown", |
576 | 596 | "metadata": {}, |
577 | 597 | "source": [ |
|
597 | 617 | ] |
598 | 618 | }, |
599 | 619 | { |
| 620 | + "attachments": {}, |
600 | 621 | "cell_type": "markdown", |
601 | 622 | "metadata": {}, |
602 | 623 | "source": [ |
|
618 | 639 | ] |
619 | 640 | }, |
620 | 641 | { |
| 642 | + "attachments": {}, |
621 | 643 | "cell_type": "markdown", |
622 | 644 | "metadata": {}, |
623 | 645 | "source": [ |
|
640 | 662 | ] |
641 | 663 | }, |
642 | 664 | { |
| 665 | + "attachments": {}, |
643 | 666 | "cell_type": "markdown", |
644 | 667 | "metadata": {}, |
645 | 668 | "source": [ |
|
660 | 683 | ] |
661 | 684 | }, |
662 | 685 | { |
| 686 | + "attachments": {}, |
663 | 687 | "cell_type": "markdown", |
664 | 688 | "metadata": {}, |
665 | 689 | "source": [ |
|
671 | 695 | ] |
672 | 696 | }, |
673 | 697 | { |
| 698 | + "attachments": {}, |
674 | 699 | "cell_type": "markdown", |
675 | 700 | "metadata": {}, |
676 | 701 | "source": [ |
|
694 | 719 | ] |
695 | 720 | }, |
696 | 721 | { |
| 722 | + "attachments": {}, |
697 | 723 | "cell_type": "markdown", |
698 | 724 | "metadata": {}, |
699 | 725 | "source": [ |
|
717 | 743 | ] |
718 | 744 | }, |
719 | 745 | { |
| 746 | + "attachments": {}, |
720 | 747 | "cell_type": "markdown", |
721 | 748 | "metadata": {}, |
722 | 749 | "source": [ |
|
741 | 768 | ] |
742 | 769 | }, |
743 | 770 | { |
| 771 | + "attachments": {}, |
744 | 772 | "cell_type": "markdown", |
745 | 773 | "metadata": {}, |
746 | 774 | "source": [ |
|
767 | 795 | ] |
768 | 796 | }, |
769 | 797 | { |
| 798 | + "attachments": {}, |
770 | 799 | "cell_type": "markdown", |
771 | 800 | "metadata": {}, |
772 | 801 | "source": [ |
|
792 | 821 | ] |
793 | 822 | }, |
794 | 823 | { |
| 824 | + "attachments": {}, |
795 | 825 | "cell_type": "markdown", |
796 | 826 | "metadata": {}, |
797 | 827 | "source": [ |
|
816 | 846 | ] |
817 | 847 | }, |
818 | 848 | { |
| 849 | + "attachments": {}, |
819 | 850 | "cell_type": "markdown", |
820 | 851 | "metadata": {}, |
821 | 852 | "source": [ |
|
843 | 874 | ] |
844 | 875 | }, |
845 | 876 | { |
| 877 | + "attachments": {}, |
846 | 878 | "cell_type": "markdown", |
847 | 879 | "metadata": {}, |
848 | 880 | "source": [ |
|
852 | 884 | ] |
853 | 885 | }, |
854 | 886 | { |
| 887 | + "attachments": {}, |
855 | 888 | "cell_type": "markdown", |
856 | 889 | "metadata": {}, |
857 | 890 | "source": [ |
|
877 | 910 | ] |
878 | 911 | }, |
879 | 912 | { |
| 913 | + "attachments": {}, |
880 | 914 | "cell_type": "markdown", |
881 | 915 | "metadata": {}, |
882 | 916 | "source": [ |
|
903 | 937 | ] |
904 | 938 | }, |
905 | 939 | { |
| 940 | + "attachments": {}, |
906 | 941 | "cell_type": "markdown", |
907 | 942 | "metadata": {}, |
908 | 943 | "source": [ |
|
932 | 967 | ] |
933 | 968 | }, |
934 | 969 | { |
| 970 | + "attachments": {}, |
935 | 971 | "cell_type": "markdown", |
936 | 972 | "metadata": {}, |
937 | 973 | "source": [ |
938 | 974 | "## Variables\n", |
939 | 975 | "\n" |
940 | 976 | ] |
| 977 | + }, |
| 978 | + { |
| 979 | + "attachments": {}, |
| 980 | + "cell_type": "markdown", |
| 981 | + "metadata": {}, |
| 982 | + "source": [ |
| 983 | + "## Events\n", |
| 984 | + "Events can be generated by Control-M or can trigger jobs. Events are defined by a name and a date.\n", |
| 985 | + "\n", |
| 986 | + "Here is a list of the various capabilities of event usages:\n", |
| 987 | + "\n", |
| 988 | + " A job can wait for events before running, add events after running, or delete events after running. See [WaitForEvents](#WaitForEvents), [AddEvents](#addevents), and [DeleteEvents](#deleteevents)\n", |
| 989 | + "\n", |
| 990 | + "You can set events for a Job, Folder, or SubFolder.<br>\n", |
| 991 | + "For \"Date\", you can use the following values:\n", |
| 992 | + "\n", |
| 993 | + "|Date Type | Description | \n", |
| 994 | + "| --------------- | --------------- |\n", |
| 995 | + "| AnyDate | Any scheduled date | \n", |
| 996 | + "| OrderDate | Control-M scheduled date.If you do not specify a Date value, this is the default. | \n", |
| 997 | + "| PreviousOrderDate | Previous Control-M scheduled date |\n", |
| 998 | + "| NextOrderDate | Next Control-M scheduled date | \n", |
| 999 | + "| MMDD | Specific date Example: \"0511\" | \n", |
| 1000 | + "\n" |
| 1001 | + ] |
| 1002 | + }, |
| 1003 | + { |
| 1004 | + "attachments": {}, |
| 1005 | + "cell_type": "markdown", |
| 1006 | + "metadata": {}, |
| 1007 | + "source": [ |
| 1008 | + "### WaitForEvents\n", |
| 1009 | + "The following example shows how to define events that the job must wait for before running:" |
| 1010 | + ] |
| 1011 | + }, |
| 1012 | + { |
| 1013 | + "cell_type": "code", |
| 1014 | + "execution_count": 32, |
| 1015 | + "metadata": {}, |
| 1016 | + "outputs": [], |
| 1017 | + "source": [ |
| 1018 | + "waitForEventList = WaitForEvents(\"WaitForEvent\", events=[Condition(event=\"e1\"),Condition(event=\"e2\"), Condition(event=\"e3\", date=Event.Date.AnyDate)])\n", |
| 1019 | + "job = JobCommand('Job1', command='echo Hello')\n", |
| 1020 | + "job.wait_for_events_list.insert(0, waitForEventList)" |
| 1021 | + ] |
| 1022 | + }, |
| 1023 | + { |
| 1024 | + "attachments": {}, |
| 1025 | + "cell_type": "markdown", |
| 1026 | + "metadata": {}, |
| 1027 | + "source": [ |
| 1028 | + "### AddEvents\n", |
| 1029 | + "The following example shows how to specify events for the job to add after running:" |
| 1030 | + ] |
| 1031 | + }, |
| 1032 | + { |
| 1033 | + "cell_type": "code", |
| 1034 | + "execution_count": 33, |
| 1035 | + "metadata": {}, |
| 1036 | + "outputs": [], |
| 1037 | + "source": [ |
| 1038 | + "addEventListObject = AddEvents('eventsToAdd', events=[ConditionOutAdd(event=\"e4\",date=Event.Date.NoDate)])\n", |
| 1039 | + "job = JobCommand('Job1', command='echo Hello')\n", |
| 1040 | + "job.add_events_list.insert(0, waitForEventList)" |
| 1041 | + ] |
| 1042 | + }, |
| 1043 | + { |
| 1044 | + "attachments": {}, |
| 1045 | + "cell_type": "markdown", |
| 1046 | + "metadata": {}, |
| 1047 | + "source": [ |
| 1048 | + "### DeleteEvents\n", |
| 1049 | + "The following example shows how to specify events for the job to remove after running:" |
| 1050 | + ] |
| 1051 | + }, |
| 1052 | + { |
| 1053 | + "cell_type": "code", |
| 1054 | + "execution_count": 34, |
| 1055 | + "metadata": {}, |
| 1056 | + "outputs": [], |
| 1057 | + "source": [ |
| 1058 | + "deleteEventListObject = DeleteEvents('eventsToDelete', events=[ConditionOutDelete(event=\"e5\",date=Event.Date.NextOrderDate)])\n", |
| 1059 | + "job = JobCommand('Job1', command='echo Hello')\n", |
| 1060 | + "job.delete_events_list.insert(0, deleteEventListObject)" |
| 1061 | + ] |
941 | 1062 | } |
942 | 1063 | ], |
943 | 1064 | "metadata": { |
|
956 | 1077 | "name": "python", |
957 | 1078 | "nbconvert_exporter": "python", |
958 | 1079 | "pygments_lexer": "ipython3", |
959 | | - "version": "3.10.4" |
| 1080 | + "version": "3.8.9" |
960 | 1081 | }, |
961 | 1082 | "orig_nbformat": 4, |
962 | 1083 | "vscode": { |
|
0 commit comments