Skip to content

Commit 0a97cc0

Browse files
committed
cron job prints in unbuffered mode
modified: python2port.py
1 parent 8c21fbe commit 0a97cc0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cron_job/python2port.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
# Get executing python file path
2929
dir_path = os.path.dirname(os.path.realpath(__file__))
3030

31+
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) # Set unbuffered mode
3132
print("DIR: ", dir_path)
3233

3334
# Create the folder, skip if exists

0 commit comments

Comments
 (0)