Browse Source

Add delete_cronjobs command to run.py

production
Brandon Cornejo 10 years ago
parent
commit
7c3eade8dc
  1. 5
      app/views.py
  2. 10
      run.py

5
app/views.py

@ -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

@ -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…
Cancel
Save