Download the PHP package garvinhicking/adhoc-tasks without Composer

On this page you can find all versions of the php package garvinhicking/adhoc-tasks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package adhoc-tasks

typo3-adhoc-tasks

Allows to run any TYPO3 (v14) Scheduler Task on the command line, with custom configuration

This was originally proposed as https://review.typo3.org/c/Packages/TYPO3.CMS/+/90852.

Installation

This package can be installed (in TYPO3 v14) as a composer package:

See packagist: https://packagist.org/packages/garvinhicking/adhoc-tasks

No "classic mode" support is planned for this extension.

Description

With the reworked scheduler data storage format of TYPO3 v14 (https://forge.typo3.org/issues/106532) this opened up the possibility to have "ad-hoc" tasks.

Previously, the TYPO3 scheduler tasks that were extended from AbstractTask did not allow to be run without specific configuration. They needed to be stored as a task in the database, containing serialized parameters/arguments.

This meant, that these tasks could only be run from typo3/bin/typo3 scheduler:execute if they had a corresponding serialized task database entry, and could not be run with different configuration on the CLI, or at all.

To bypass this, the recommendation was to create all tasks as Symfony Commands, which also allowed CLI execution. This is still a recommendation for today.

However, several TYPO3 core tasks still exist (like for garbage collection, file reference integrity and others) and these are now executable as ad-hoc tasks, without the need to refactor every AbstractTask into a Symfony Command.

Ad-hoc tasks can be executed like:

The two new options --task and --config specify the unique ID of a task to execute (currently a fully-qualified classname, in the future probably shorthand IDs), and passes the arguments as a JSON string.

The choice to put a serialized JSON string as arguments has several advantages:

HINT: The list of available parameters of a given task type can be investigated via:

A second command bin/typo3 scheduler:adhoc:list shows a list of all ad-hoc tasks that are available, with a list of their parameters.

Impact

All TYPO3 Core tasks and custom AbstractTask implementations utilizing the "native task" TCA format can now be run from the CLI and no longer need "dummy" entries in the Scheduler.

This helps for debugging tasks as well as one-off runs of a specific task.

TODO

Tests were adapted from the TYPO3 Core patch. They do not (yet) work standalone due to difference in how Symfony CLI commands can be tested.


All versions of adhoc-tasks with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^14.0
typo3/cms-scheduler Version ^14.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package garvinhicking/adhoc-tasks contains the following files

Loading the files please wait ...