Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8a70775

Browse files
script to run code at a given time added
1 parent 52f24ff commit 8a70775

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hii guys ,your Lunch time begins !
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#import datetime library in python
2+
from datetime import datetime
3+
# Saves a .txt file with file name
4+
# as 2020年01月11日-10-20-23.txt at current time indicated by now function of datetime library
5+
with open(datetime.now().strftime("%Y-%m-%d-%H-%M-%S"), "w")as myfile:
6+
#instead of now i could also initialse with datetime(1999, 12, 12, 12, 12, 12, 342380) to give the time values to datetime constructor
7+
# Content of the file (it can be any script in python which we want to run at a particular time )
8+
myfile.write("hii guys ,your Lunch time begins ! ")

‎run_script_at_particular_time/readme.md‎

Whitespace-only changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /