You can write programs that launch other programs on a schedule by using the subprocess and threading modules.

For example, you could schedule a backup for every week or month and at a scheduled time like 10: 00 pm.

Alright, before we get started I’d like to give a glimpse of what this article covers.

  • The Time Module
  • Suspending execution — time.sleep() Function
  • understanding time zones
  • Creating a StopWatch-Project

The Time Module

Your computer’s system clock is set to a specific date, time, and time zone.

The built-in time module allows your Python programs to read the system

clock for the current time. The time.time() and time.sleep() functions are

the most useful in the time module.

The time.time() Function

The Unix epoch is a time reference commonly used in programming: 12 am

on January 1, 1970, Coordinated Universal Time (UTC).More about time will be exaggerated later in the 3rd section of this article.For now let us look at

The time.time()

function returns the number of seconds since that moment as a float value.

This number is called an epoch timestamp. For example, enter the following into the interactive shell:

Image for post

#python3 #software #coding #projects #python

What Can You Do With Python’s Time Module?
1.35 GEEK