Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/app/code/Soon/DataSync/docs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/old/app/code/Soon/DataSync/docs/02_The_DataSync_CLI.md
# The DataSync CLI

## Running a single job by its code

`php bin/magento soon_datasync:run [job code]`

## Running all active jobs

`php bin/magento soon_datasync:run --all`

## Passing and retrieving options

You can pass options to a job by populating the `--options` argument.
This argument receives a list of `key:value` separated by commas.

For example:
`php bin/magento soon_datasync:run [job code] --options=order_id:5,customer_name=John`
will pass `order_id => 5` and `customer_name => John`to DataSync.

You can then retrieve all options from your job by using `$this->getOptions()`.
This will return an array with all options from the CLI.

You can also retrieve one specific option by using `$this->getOption('OPTION_KEY')`
Based on our previous example, if you wish to get the value for the `order_id` option:

```
$this->getOption('order_id');
// returns 5
```

Spamworldpro Mini