File: Autocancel.rst

package info (click to toggle)
ecflow 5.15.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,868 kB
  • sloc: cpp: 269,341; python: 22,756; sh: 3,609; perl: 770; xml: 333; f90: 204; ansic: 141; makefile: 70
file content (57 lines) | stat: -rw-r--r-- 1,609 bytes parent folder | download | duplicates (3)
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
ecflow.Autocancel
/////////////////


.. py:class:: Autocancel
   :module: ecflow

   Bases: :py:class:`~Boost.Python.instance`

Provides a way to automatically delete/remove a node which has completed

See :term:`autocancel`

Constructor::

   Autocancel(TimeSlot,relative)
      TimeSlot single: A time
      bool relative:   Relative to completion. False means delete the node at the real time specified.

   Autocancel(hour,minute,relative)
      int hour:        hour in 24 hrs
      int minute:      minute <= 59
      bool relative:   Relative to completion. False means delete the node at the real time specified.

   Autocancel(days)
      int days:        Delete the node 'days' after completion

Usage:

.. code-block:: python

   attr = Autocancel( 1,30, true )              # delete node 1 hour and 30 minutes after completion
   attr = Autocancel( TimeSlot(0,10), true )    # delete node 10 minutes after completion
   attr = Autocancel( TimeSlot(10,10), false )  # delete node at 10:10 after completion
   attr = Autocancel( 3  )                      # delete node 3 days after completion

   t1 = Task('t1',
              Autocancel(2,0,true))             # delete task 2 hours after completion


.. py:method:: Autocancel.days( (Autocancel)arg1) -> bool :
   :module: ecflow

Returns a boolean true if time was specified in days


.. py:method:: Autocancel.relative( (Autocancel)arg1) -> bool :
   :module: ecflow

Returns a boolean where true means the time is relative


.. py:method:: Autocancel.time( (Autocancel)arg1) -> TimeSlot :
   :module: ecflow

returns cancel time as a TimeSlot