Add custom cron to newsletter schedule
This commit is contained in:
@@ -639,7 +639,7 @@ def dbcheck():
|
||||
'CREATE TABLE IF NOT EXISTS newsletters (id INTEGER PRIMARY KEY AUTOINCREMENT, '
|
||||
'agent_id INTEGER, agent_name TEXT, agent_label TEXT, '
|
||||
'friendly_name TEXT, newsletter_config TEXT, email_config TEXT, '
|
||||
'subject TEXT, body TEXT, cron TEXT NOT NULL DEFAULT "0 0 * * 0", active INTEGER DEFAULT 0)'
|
||||
'subject TEXT, body TEXT, cron TEXT NOT NULL DEFAULT "0 0 * * 0", cron_type TEXT, active INTEGER DEFAULT 0)'
|
||||
)
|
||||
|
||||
# newsletter_log table :: This is a table which logs newsletters sent
|
||||
|
@@ -230,6 +230,7 @@ def set_newsletter_config(newsletter_id=None, agent_id=None, **kwargs):
|
||||
'subject': agent_class.subject,
|
||||
'body': agent_class.body,
|
||||
'cron': kwargs.get('cron'),
|
||||
'cron_type': kwargs.get('cron_type'),
|
||||
'active': kwargs.get('active')
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user