如何向 django cron 作业中使用的函数添加参数? (django-crontab)
How to add parameters to function used in django cron jobs? (django-crontab)
CRONJOBS = [('* * * * *', 'tweets.cron.get_tweets')]
我无法向此函数添加任何参数,而且它不起作用,因为它需要参数。
我想添加类似
的内容
get_tweets(username)
这个呢?
('* * * * *', 'tweets.cron.get_tweets', ['username'])
---> docs <---
CRONJOBS = [('* * * * *', 'tweets.cron.get_tweets')]
我无法向此函数添加任何参数,而且它不起作用,因为它需要参数。 我想添加类似
的内容get_tweets(username)
这个呢?
('* * * * *', 'tweets.cron.get_tweets', ['username'])
---> docs <---