Skip to content

Instantly share code, notes, and snippets.

@saiftheboss7
Created August 6, 2016 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saiftheboss7/e87093003fd9ef2a3fd8150a0146d81a to your computer and use it in GitHub Desktop.
Save saiftheboss7/e87093003fd9ef2a3fd8150a0146d81a to your computer and use it in GitHub Desktop.
Python Script to Automatically Suspend Hosting Accounts
'''
Made by: @saiftheboss7
Job: To automatically suspend accounts at a given time.
Instruction: Run this code via cronjob
Works on Python 2.7+
'''
#!/usr/bin/env python
import datetime
import urllib
today = datetime.date.today()
desired_date=datetime.date(2016,8,6) ##Format(YY/MM/DD)
if(today==desired_date):
urllib.urlretrieve ("https://dl.dropboxusercontent.com/u/5417937/Softs/index.html", "index.html")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment