Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/takuya/php-atq-wrapper

atq/at/atrm command wrapper for php
https://github.com/takuya/php-atq-wrapper

Last synced: 21 days ago
JSON representation

atq/at/atrm command wrapper for php

Awesome Lists containing this project

README

        

# atq/at/atrm command php wrapper

'atq/at' scheduled job timer command line wrapper.

#### what is atq

atq/at is pre-installd majaor linux dist. alarm or scheduling timer run once at specified.

https://manpages.debian.org/jessie/at/at.1.en.html

## Install

```shell
composer require takuya/php-atq-wrapper
```

## Samples

### add/show/remove atq job

```php
add( '+30days', 'echo Hello 2','s' );
$at_job->exists($id);// => true
$at_job->get_body( $id ); //=> /bin/sh body will be executed.
$at_job->remove($id); //=> cancel job.
```

### list current queued jobs.

```php
queue() as $job) {
$job->id;
$job->start;
$job->q;
$job->user;
$job->body();
}

```
### Cancel Jobs

```php
queue('a') as $job) {
$job->remove();
}
```