Scheduling script execution

The CRONJOB Job Scheduler feature enables Transfer CFT to execute scripts at predetermined dates and times. An example script, cron-wlog.cmd, is delivered in the installed product packaging ($CFTDIRRUNTIME/exec on Unix/Windows). You can adapt this example to suit your local requirements.

CRON commands and parameters

This section describes the CRON related commands and parameters.

  • RECONFIG TYPE=CRON
    • This sends a notification to Transfer CFT to reload the enabled CRONJOBs. You use this command after modifying a CFTCRON (when either inserting or deleting).
  • MQUERY name=CRON
    • Displays the log, which gives the current status of the enabled cronjobs.
  • ACT/INACT type=CRON
    • To activate CRON4:
    • ACT type=CRON, ID=CRON4

    • To inactivate CRON1, enter:
    • INACT type=CRON, ID=CRON1

CFTCRON time syntax

CRONJOB messages

The possible cronjob messages are:

  • CFTI36I &str: Information Message about cronjobs load
  • CFTI38E &str: Error Message about cronjobs load
  • CFTS37I &str: Information Message about cronjob submit
  • CFTS39E &str: Error Message about cronjob submit

CRONJOB symbolic variables

The table below lists the symbolic variables available in the CRONJOB procedure. Define these using the EXEC parameter of the CFTCRON command.

Symbolic variable

Corresponding substituted value

&CFTEVENT

Fixed name=CRONJOB

&CFTNAME

The PART value in the command CFTPARM

&SYSDATE

System date

&SYSTIME

System time

&SYSDAY

Day of the week

&NSUB

Counter for all the Cronjob procedures launched

&ID

Cronjob Identifier

&CRONTAB

Crontab value

&USERID

User identifier indicated in CFTCRON command

&COMMENT

Comment value indicated in CFTCRON command

&PARM

Parm value indicated in CFTCRON command

&SCOUNT

Counter for the Cronjob procedures launched for a specific Identifier

 

Related Links