Revision 8ca5b761-84d2-424e-bc70-a863842b0a21 - Stack Overflow

I'm trying to use **Python-crontab** module over Linux OS (CentOS 7)

My config file is as follows:

 {
 "ossConfigurationData": { 
 "work1": [
 { 
 "cronInterval": "0 0 0 1 1 ?", 
 "attribute": [
 { 
 "rules": [
 {
 ......
 }
 ] 
 }
 ],
 "work2": [
 { 
 "cronInterval": "0 0 0 1 2 ?", 
 "attribute": [
 { 
 "rules": [
 {
 ......
 }
 ] 
 },
 ]
 }
}

The file contain many work items. Each work item has it own cron expression. I want my Python script to be able to schedule each cron separately, set it in my OS & run it. When running, the purpose is running each work item separately according to it cron expression 
I did step-by-step according to [this][1] tutorial. After many tests it's writing the cron, but I'm not sure it's what I need

Using this module, I can't create reference to the relevant work item. It's just adding a new line to the OS crontab with any execution I want to put there. I can't describe what I wish to run (i.e. - *work1* or *work2*) 

Any suggestions? 


10x in advance :) 

 [1]: https://stackabuse.com/scheduling-jobs-with-python-crontab/

AltStyle によって変換されたページ (->オリジナル) /