TasksVariable

Type
Class
Namespace
Craft
Inherits
Craft\TasksVariable
Since
2.0

Task functions.

See also http://craftcms.com

View source (opens new window)

# Public Methods

Method Description
areTasksPending() Returns whether there are any pending tasks.
getRunningTask() Returns the currently running task.
getTaskInfo() Returns info about the background tasks.
getTotalTasks() Returns the total number of active tasks.
haveTasksFailed() Returns whether any tasks that have failed.
isTaskRunning() Returns whether there is a task that is currently running.

# areTasksPending()

Returns whether there are any pending tasks.

View source (opens new window)

Returns

boolean (opens new window)

Signature

public boolean areTasksPending ( )

# getRunningTask()

Returns the currently running task.

View source (opens new window)

Returns

Craft\TaskModel, null (opens new window)

Signature

public Craft\TaskModel, null getRunningTask ( )

# getTaskInfo()

Returns info about the background tasks.

View source (opens new window)

Signature

public void getTaskInfo ( )

# getTotalTasks()

Returns the total number of active tasks.

View source (opens new window)

Returns

boolean (opens new window)

Signature

public boolean getTotalTasks ( )

# haveTasksFailed()

Returns whether any tasks that have failed.

View source (opens new window)

Returns

boolean (opens new window)

Signature

public boolean haveTasksFailed ( )

# isTaskRunning()

Returns whether there is a task that is currently running.

View source (opens new window)

Returns

boolean (opens new window)

Signature

public boolean isTaskRunning ( )