import time, os

## Use in conjunction with scheduler.

os.system('cls')
print('Shutdown sequence set for 30 seconds.')
print('')

s = 30  ## NOTE:<===== 30 seconds ##
while (s > 0):
        mins = s // 60
        secs = s % 60
        timer = '{:02d}:{:02d}'.format(mins, secs)

        if s & 1:
            dot = '• '          
        else:
            dot = ' •'

        ## NOTE: Print on the same line.
        print('Windows PC shutting down in [' + str(dot) + '] ' + timer, end="\r")
        time.sleep(1)
        s = s - 1

os.system('shutdown /s /t 1')

## END ##