Download the PHP package boboldehampsink/cronjob without Composer

On this page you can find all versions of the php package boboldehampsink/cronjob. 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 cronjob

DEPRECATED - Cronjob Manager plugin for Craft CMS

Craft plugin to programmatically manage GNU/Linux cronjobs.

Deprecated:

With the release of Craft 3 on 4-4-2018, this plugin has been deprecated. You can still use this with Craft 2 but you are encouraged to use (and develop) a Craft 3 version. At this moment, I have no plans to do so.

Features:

Requirements:

Installation:

The library can be installed using Composer.

Usage:

The plugin is composed of three models:

Instanciate the repository:

In order to work, the Cronjob_RepositoryModel needs an instance of Cronjob_AdapterModel which handles raw read/write against the crontab.

Create a new cronjob and persist it into the crontab:

Suppose you want to create an new job which consist of launching the command "df >> /tmp/df.log" every day at 23:30. You can do it in two ways.

You can now add your new cronjob in the crontab repository and persist all changes to the crontab.

Find a specific cronjob from the crontab repository and update it:

Suppose we want to modify the hour of an already existing cronjob. Finding existings jobs is made using some regular expressions. Search in made against the entire crontab line.

Remove a cronjob from the crontab:

You can remove a job like this :

Note: Since cronjobs are internally matched by reference, they must be previously obtained from the repository or previously added.

Work with the crontab of another user than runtime user:

This feature allow you to manage the crontab of another user than the user who launched the runtime. This can be useful when the runtime user is www-data but the owner of the crontab you want to edit is your own linux user account.

To do this, simply pass the username of the crontab owner as parameter of the Cronjob_AdapterModel constructor. Suppose you are www-data and you want to edit the crontab of user bobby:

Using this way you will propably run into user rights issue. This can be resolved by editing your sudoers file using 'visudo'.
If you want to allow user www-data to edit the crontab of user bobby, add this line:

which tells sudo to not ask for password when you call crontab of user bobby

Now, you can have access to the crontab of user bobby like this :

Note the second parameter true of the Cronjob_AdapterModel constructor call. This boolean tell the Cronjob_AdapterModel to use 'sudo' internally to read/write the crontab.

Enable or disable a cronjob

You can enable or disable your cron jobs by setting the "enabled" attribute of a CronjobModel object accordingly:

This will have the effect to prepend your cronjob by a "#" in your crontab when persisting it.

Todo

Changelog

0.1.1

0.1.0

Credits

Based on TiBeN/CrontabManager


All versions of cronjob with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
tiben/crontab-manager Version ~1.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 boboldehampsink/cronjob contains the following files

Loading the files please wait ....