(go to: table of contents, index, list of vms_sys, prev: SCAN_INTRUSION, next: SETDDIR)
Format:
SCHDWK - Schedule Wakeup
Schedules the awakening (restarting) of a process that has placed
itself in a state of hibernation with the Hibernate
(SYS$HIBER) service.
28-SEP-1998 ZE.
targpid = vms_sys.schdwk ([pidadr], [prcnam], daytim [,reptim])
Returns:
Arguments:
The targed PID (targpid) is always returned - it is as if you have specified
a '0' value for the 'pidadr' argument.
If an error happens, then vms_sys.schdwk() raises a Python exception.
Examples:
64-bit system time - a Python long integer.
See GENMAN 'Programming',
'special OpenVMS datatypes'
for details.
64-bit system time - a Python long integer.
See GENMAN 'Programming',
'special OpenVMS datatypes'
for details.
>>> import vms_sys
>>> # translate ASCII delta time to 'binary quadword' equivalent.
>>> q_10secs = vms_sys.bintim ('0 00:00:10.00')
>>> q_10secs
-100000000L
>>> # wait a single 10 second shot
>>> vms_sys.asctim ()
'12-AUG-1998 11:29:38.73'
>>> vms_sys.schdwk (0, None, q_10secs)
96 <-- PID of current process
>>> vms_sys.hiber ()
>>> vms_sys.asctim ()
'12-AUG-1998 11:29:48.91'
>>> # repeated wakeup with 5 seconds interval
>>> vms_sys.asctim ()
'12-AUG-1998 11:29:49.08'
>>> vms_sys.schdwk (0, None, q_10secs, \
... vms_sys.bintim ('0 00:00:05.00'))
96 <-- PID of current process
>>> vms_sys.hiber ()
>>> vms_sys.asctim ()
'12-AUG-1998 11:29:59.33'
>>> vms_sys.hiber ()
>>> vms_sys.asctim ()
'12-AUG-1998 11:30:04.35'
>>> vms_sys.hiber ()
>>> vms_sys.asctim ()
'12-AUG-1998 11:30:09.33'
>>> vms_sys.canwak ()
96 <-- PID of current process
>>> vms_sys.hiber ()
--> process 'hangs' because wakeup was cancelled
use <CONTROL-Y> to exit
>>> # None + None means this process as well as (0,None,LongInt)
>>> vms_sys.schdwk (None, None, 0xFFFFFFFFFA0A1F00L)
96 <-- PID of current process
>>> # first 'None' skips PID, second argument is process name
>>> vms_sys.schdwk (None, 'NOSUCHPROC', 0xFFFFFFFFFA0A1F00L)
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_sys.error: (2280, '%SYSTEM-W-NONEXPR, nonexistent process')
>>> vms_sys.schdwk (None, 1, 0xFFFFFFFFFA0A1F00L)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 2: expected read-only buffer, int found
>>> vms_sys.schdwk (None, None, 'not-a-long-int')
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 3: daytim - must be long integer
>>> vms_sys.schdwk (None, None, 0xFFFFFFFFFA0A1F00L, 1)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 4: reptim - must be long integer
>>>
(go to: table of contents,
index,
list of vms_sys,
prev: SCAN_INTRUSION,
next: SETDDIR)