Skip to content

Commit

Permalink
testfile
Browse files Browse the repository at this point in the history
  • Loading branch information
hantswilliams committed Sep 28, 2022
1 parent 4dc0062 commit 81708f9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cronjobs/testFile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import sys
import time

# get current working directory
cwd = os.getcwd()

# print cwd
print(cwd)

# create a new dictionary with dummy data
data = {'a': 1, 'b': 2, 'c': 3}

# get the current time
now = time.time()

# save current time as a string
nowStr = time.strftime("%Y-%m-%d_%H:%M:%S", time.localtime(now))

# create a new file in the current working directory
with open(cwd + '/testFile_' + nowStr + '.txt', 'w') as f:
f.write(str(data))


0 comments on commit 81708f9

Please sign in to comment.