Skip to content
Snippets Groups Projects
Jobs.md 1.23 KiB
Newer Older
TGermain's avatar
TGermain committed
#  Setting up recurrent routines : Jobs

Sen2Chain uses jobs to execute whole processing operations (downloading L1C, computing L2A with Sen2Cor, masking clouds, and producing indices).

Jobs config files are stored in your \~/sen2chain_data/config/jobs/.

There is two kind of files for each job :

- job_jid.cfg
- job_jid.py

With _jid_ the job identifier, can be any character chain.

```python
>>> from sen2chain import Jobs, Job
```

## Jobs

The _Jobs_ class is used to list all jobs present for your user.

```python
>>> Jobs()
       job_id  config_file  python_script logging       timing cron_status cron_timing
0  0123456789         True           True   False    0 5 * * *      absent        None
1         335         True           True   False  10 10 * * *      absent        None
2         012         True          False   False    * * * * *      absent        None
3         013         True          False   False    * * * * *      absent        None
```

Jobs can be removed using the _remove_ function and their _job_id_ identifier

```python
>>> Jobs().remove("335")
10094:2022-03-17 17:03:35:INFO:sen2chain.jobs:Removing Python script...
10094:2022-03-17 17:03:35:INFO:sen2chain.jobs:Removing config file...
```

## Job

to be filled