1from flask import Flask
2from flask import send_file
3app = Flask(__name__)
4
5@app.route('/download')
6def downloadFile ():
7 #For windows you need to use drive name [ex: F:/Example.pdf]
8 path = "/Examples.pdf"
9 return send_file(path, as_attachment=True)
10
11if __name__ == '__main__':
12 app.run(port=5000,debug=True)
1# Example of job definition:
2# .---------------- minute (0 - 59)
3# | .------------- hour (0 - 23)
4# | | .---------- day of month (1 - 31)
5# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
6# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
7# | | | | |
8# * * * * * user-name command to be executed
9
10# Set the hardware clock to keep it in sync with the more accurate system clock
1103 05 * * * /sbin/hwclock --systohc
12
13# Perform monthly updates on the first of the month
14# 25 04 1 * * /usr/bin/dnf -y update