Thanks
---
So at this line of your extension :
130 :
& at this line of my extension :
64 :
Code: Select all
return ($this->config['dark1_rsi_auto_reduce_sync_enable'] && $this->config['dark1_rsi_enable']);
To enable / disable the cron task , in your case should be :
Code: Select all
return $this->config['primepostrev_cron_enable'];
If user set's
config['primepostrev_cron_enable']
aka
Enable Cron Task as
false
aka
NO then cron task should not run.
Default should be
true
.
So when user has issues with cron or they don't want it to be run , you can ask them to disable it.
---
Now at this line of your extension :
141 :
Code: Select all
return $this->config['primepostrev_cron_last_run'] < time() - $this->cron_frequency;
& at this line of my extension :
74 :
Code: Select all
return (($this->config['dark1_rsi_auto_reduce_sync_last_gc'] < (time() - $this->config['dark1_rsi_auto_reduce_sync_gc'])) && ($this->config['dark1_rsi_time'] < (time() - $this->config['dark1_rsi_interval'])));
To control the frequency of the cron task , in your case should be :
Code: Select all
return $this->config['primepostrev_cron_last_run'] < (time() - $this->config['primepostrev_cron_frequency']);
assuming you will store the Day(s) in seconds.
If user set's
config['primepostrev_cron_frequency']
aka
Cron Task Frequency as
172800
(secs) aka
2 days then cron task should run every 2 days.
Default should be
86400
.
So when user want's to run cron at lower frequency , you can ask them to increase the number of Days.
---
I hope you will understand the above.
Best regards