Download the PHP package basecom/akeneo-cron-ui without Composer

On this page you can find all versions of the php package basecom/akeneo-cron-ui. 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 akeneo-cron-ui

Basecom CronUI Bundle

The basecom CronUI is an extension for Akeneo community and enterprise edition. It adds a new user interface which can be used to create, manage and delete cronjobs. Also, it allows the developers to create cronjobs through code.

Table of contents

  1. Installation
    1.1 Requirements
    1.2 Install the bundle
  2. Usage
    2.1 Define cronjobs in code
    2.1.1 Symfony Commands
    2.1.2 Akeneo Jobs
    2.2 Registering cronjobs
    2.3 Define cronjobs in ui
  3. Contributing
  4. Authors
  5. License

Installation

Requirements

This bundle requires Akeneo 4.0.33 Community Edition or higher. Also it requires PHP 7.1 or higher.

Install the bundle

  1. Install this package via composer:

  2. Follow the installation steps of the Custom entity bundle if not already installed.

  3. Add the bundle to the bundles.php:

  4. Run the doctrine schema update to create the new cronjobs table

  5. Add the cronjobs:run command to the crontab:

  6. Clear all caches and regenerate front-end assets:

Usage

There are two ways to create cronjobs. You can create them via the user interface, and you may define them in code. The benefit of creating them via code is that you can execute regular PHP code. The cronjobs defined in the user interface can perform any shell command, including but not limited to the Symfony commands.

Define cronjobs in code

Every cronjob needs to implement the interface Cronjob. The interface consists of three methods: getCronExpression, execute and getLabel. The getCronExpression method can take any valid cron expression including @daily, @monthly and more. You can read more related to cron expressions here. The execute method can run any php code. The getLabel method is only used for logging purposes and will never be shown inside the user interface.

A very basic cronjob, which curl's a specific url can be seen here:

In addition to the interface there are multiple abstract classes which can be used for specific purposes (running a symfony command or akeneo job for example). If your own cronjob extends one of these classes there is no need to implement the interface manually since it is already implemented in the classes.

Symfony Commands (CommandCronjob)

This abstract class can be used to execute any symfony / akeneo command. Here is a basic example, which will run a "schema:update" every hour:

Akeneo Jobs (JobCronjob)

The last abstract class allows the execution of import and export jobs for akeneo. It can take additional parameters (like the filePath) and run the job. All jobs are automatically put into the default akeneo queue.

Registering cronjobs

To register your created cronjobs (regardless which interface and class you used) you just need to register the cronjob as a service and tag it with: basecom.cronjob. This is a example of the ExportProductsCronjob which is registered in resources/config/cronjobs.yml:

The symfony and akeneo cronjobs require that you pass the kernel root dir as the first parameter. This is used to find the correct ./bin/consolefile to execute the commands. Of course you can pass more arguments to your custom cronjobs. The symfony compiler will automatically find all registered cronjobs with the tag basecom.cronjob.

Define cronjobs in ui

It is also possible to register cronjobs through the UI of akeneo. This is useful if some cronjobs are different between stages of your application (e.g. staging, live, etc.). To register a new cronjob, navigate in the ui to Settings > Cronjobs.

To add a new cronjob, simply press the Create button and fill in a unique code and the command. Every command is relative to the root directory of your installation. So you may define commands like this: ./bin/console some:akeneo:command.

After the creation it will automatically open the edit page for this new cronjob. There you may define the cron expression. You can switch between the manual input and some predefined expressions. You can use any default cron expressions.

Contributing

If you need help or want to ask a question, open an issue. If you found a bug or have a feature request please also open an issue.

We welcome everyone to create Pull Requests and discuss new ideas.

If you found a security-related issue, please send details via e-mail to [email protected]

Authors

basecom GmbH & Co. KG


Core Team

Jordan Kniest
Github

License

Copyright basecom GmbH & Co. KG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of akeneo-cron-ui with dependencies

PHP Build Version
Package Version
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 basecom/akeneo-cron-ui contains the following files

Loading the files please wait ....