Controller: /nodeworx/cron

Required Permissions

CRON

Action: add

Added in Version

4.7.0-339

Description

Add a job to a user’s crontab.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

interface

string

Yes

simple, advanced

simple

user

string

Yes

axfrdns, centos, example, iworx, nfsnobody, root

minute

struct (string)

No*

*, */2, */5, */10, */15, 0, 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, …

[“*”]

hour

struct (string)

No*

*, */2, */4, */6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23

[“*”]

day

struct (string)

No*

*, 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

[“*”]

month

struct (string)

No*

*, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

[“*”]

dayofweek

struct (string)

No*

*, 0, 1, 2, 3, 4, 5, 6

[“*”]

script

string

Yes

* indicates that it’s actually required, but probably already has a valid default value.

Action: edit

Added in Version

4.7.0-339

Description

Edit a cronjob on a user’s crontab.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

job

integer

Yes

4, 5, 6, 7, 8, 9, 10, 11, 12

enabled

integer

No*

1, 0

1

minute

string

No*

10,15,20,25,30,35,40,45,50,55,0,5

hour

string

No*

*

day

string

No*

*

month

string

No*

*

dayofweek

string

No*

*

script

string

No*

cd /home/interworx/cron ; ./iworx.pex –fively

* indicates that it’s actually required, but probably already has a valid default value.

Action: fail

Added in Version

n/a

Description

Magic function - test for failure mechanism.

Action: getCurrentSystemTime

Added in Version

6.1.19-1483

Description

Get current system time in RFC822 format.

Action: options

Added in Version

4.7.0-339

Description

Manage options for cron users.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

user

string

Yes

axfrdns, centos, example, iworx, nfsnobody, root

shell

string

No*

/bin/sh, /bin/bash, /usr/bin/sh, /usr/bin/bash, /bin/zsh, /sbin/nologin

Use the dropdown to choose the shell to run the cron job on.

path

struct (string)

No

The path contains the directories which will be in the search path for cron.

mailto

string

No

Enter an email address to be notified of the output of each cron job.

* indicates that it’s actually required, but probably already has a valid default value.

Action: queryEdit

Added in Version

5.1.0-838

Description

Displays the information available to the action “edit”.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

job

integer

Yes

4, 5, 6, 7, 8, 9, 10, 11, 12

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'systemtime' => 'Sun, 12 Jan 20 00:51:13 -0400',
    'enabled' => '1',
    'minute' => '10,15,20,25,30,35,40,45,50,55,0,5',
    'hour' => '*',
    'day' => '*',
    'month' => '*',
    'dayofweek' => '*',
    'script' => 'cd /home/interworx/cron ; ./iworx.pex --fively',
    'user' => 'iworx',
    'job' => '4',
  ),
  'reply_code' => 205,
)

Action: queryJobs

Added in Version

4.8.0-393

Description

List user jobs.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

user

string

Yes

axfrdns, centos, example, iworx, nfsnobody, root

Action: queryOptions

Added in Version

5.1.0-838

Description

Displays the information available to the action “options”.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    0 =>
    array (
      'user' => 'iworx',
      'shell' => '/bin/bash',
      'path' => '/usr/local/bin:/usr/bin',
      'mailto' => 'root',
    ),
  ),
  'reply_code' => 205,
)

Action: reroute

Added in Version

n/a

Description

Action to re-route from the current controller to a different one.

Action: win

Added in Version

n/a

Description

Magic function - test for testing success mechanism.