Python Forum
Value count - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Value count (/thread-14971.html)



Value count - sumitk - Dec-27-2018

I have a python script that needs to be run in bash shell every hour. I need to save the count of no of times script ran that day, and reset the counter to 0 for the next day. How can i create a counter variable inside my script that will be saved as run_id to count the run of the script. Please help to solve this.


RE: Value count - nilamo - Dec-28-2018

Show us what you've tried so far.


RE: Value count - Gribouillis - Dec-28-2018

This problem looks the same as Rehan11's. Do you attend the same course? If this is homework, it should go to the homework section and we'd like to see your pythonic attempts to solve the problem.