This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import schedule | |
| import time | |
| def job(): | |
| print time.strftime('%H:%M:%S') | |
| schedule.every(2).seconds.do(job) | |
| while True: | |
| schedule.run_pending() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask | |
| from apscheduler.schedulers.background import BackgroundScheduler | |
| from apscheduler.triggers.interval import IntervalTrigger | |
| import atexit | |
| import time | |
| # create flask app | |
| app = Flask(__name__) | |
| def print_time(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Illuminate\Database\Seeder; | |
| class StatesTableSeeder extends Seeder | |
| { | |
| /** | |
| * Run the database seeds. | |
| * | |
| * @return void |