Add delete_cronjobs command to run.py
This commit is contained in:
parent
6e09c8d119
commit
7c3eade8dc
@ -80,11 +80,6 @@ def teamspeak():
|
||||
def friends():
|
||||
return render_template('friends.html')
|
||||
|
||||
# Stream pages
|
||||
@app.route('/shaneomad')
|
||||
def twitch_shaneomad():
|
||||
return render_template('potatr.html', twitch_id=app.config.TWITCH_CLIENT_ID)
|
||||
|
||||
# User profile page
|
||||
@app.route('/user/<int:userid>')
|
||||
def user_profile(userid):
|
||||
|
10
run.py
10
run.py
@ -57,7 +57,15 @@ def install_cronjobs():
|
||||
print "Problem installing cronjobs: {}".format(e)
|
||||
else:
|
||||
cron.write()
|
||||
print "Cron jobs written succesfully"
|
||||
print "Cron jobs written successfully"
|
||||
|
||||
@manager.command
|
||||
def delete_cronjobs():
|
||||
from os import path
|
||||
from crontab import CronTab
|
||||
cron = CronTab(user=True)
|
||||
cron.remove_all(comment='DOOBSAUTO')
|
||||
print "Existing cronjobs deleted successfully"
|
||||
|
||||
@manager.command
|
||||
def admin(name):
|
||||
|
Loading…
x
Reference in New Issue
Block a user