Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

$$SCH^XLFDT(): Next Scheduled Runtime

Reference Type: Supported, Category: Date Functions, Integration Agreement: 10103

Description

This extrinsic function returns the next run-time based on Schedule code.

Format

  $$SCH^XLFDT(schedule_string,base_date[,force_future_flag])

Input Parameters

schedule_string:

(required) Interval to add to base_date, as follows:

  • nS—Add n seconds to base_date.

  • nH—Add n hours to base_date.

  • nD—Add n days to base_date.

  • nM—Add n months to base_date.

  • $H;$H;$H—List of $H dates.

  • nM(list)—Complex month increment. For example: 1M(15,L), which means schedule it to run every month (1M) on the 15 and last day of the month (15,L).

    • dd[@time]—Day of month (e.g., 12).

    • nDay[@time]—day of week in month (e.g., 1M, first Monday); (see "Day Code" list that follows).

    • Day.

    • L—Last day of month.

    • LDay—Last specific day in month (e.g., LM [last Monday],LT [last Tuesday],LW [last Wednesday]...).

  • Day[@time]—Day of week (see "Day Code" list that follows).
    • Day.

    • D—Every weekday.

    • E—Every weekend day (Saturday, Sunday).

    Day Code (used in schedule codes above)

    • M—Monday

    • T—Tuesday

    • W—Wednesday

    • R—Thursday

    • F—Friday

    • S—Saturday

    • U—Sunday
base_date:

(required) VA FileMan date to which the interval is added.

force_future_flag:

(optional) If passed with a value of:

  • 1—Forces returned date to be in future, by repeatedly adding interval to base_date until a future date is produced.

  • Otherwise—Interval is added once.

Output

returns:

Returns the next run-time.

Example 1

To schedule something to run every month on the 15th of the month at 2:00 p.m. and on the last day of every month at 6:00 p.m., you would enter the following:

Middle of the Month:
>S X=$$SCH^XLFDT("1M(15@2PM,L@6PM)",2931003)

>W X
2931015.14
End of the Month:
>S X=$$SCH^XLFDT("1M(15@2PM,L@6PM)",X)

>W X
2931031.18

Example 2

To schedule something to run every month on the 15th of the month at 11:00 p.m. and on the last day of every month at 8:00 p.m., you would enter the following:

Middle of the Month:
>S X=$$SCH^XLFDT("1M(15@11PM,L@8PM)",2931028)

>W X
2931031.2
End of the Month:
>S X=$$SCH^XLFDT("1M(15@11PM,L@8PM)",X)

>W X
2931115.23

Example 3

To schedule something to run every 3 months on the last day of the month at 6:00 p.m., you would enter the following:

Middle of the Month:
>S X=$$SCH^XLFDT("3M(L@6PM)",2930927)

>W X
2930930.18
End of the Month:
>S X=$$SCH^XLFDT("3M(L@6PM)",X)

>W X
2931231.18

 


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.