send email with python after specific time : I want to make python script send email with attachment (txt) every 30 minutes
here is my code it send mail with attachment without any problem 

        import smtplib
    from email.mime.text import MIMEText
    from email.mime.multipart import MIMEMultipart
    from email.mime.base import MIMEBase
    from email import encoders
    import os.path
    
    email = 'myaddress@gmail.com'
    password = 'password'
    send_to_email = 'sentoaddreess@gmail.com'
    subject = 'This is the subject'
    message = 'This is my message'
    file_location = 'C:\\Users\\You\\Desktop\\attach.txt'
    
    msg = MIMEMultipart()
    msg['From'] = email
    msg['To'] = send_to_email
    msg['Subject'] = subject
    
    msg.attach(MIMEText(message, 'plain'))
    
    filename = os.path.basename(file_location)
    attachment = open(file_location, "rb")
    part = MIMEBase('application', 'octet-stream')
    part.set_payload((attachment).read())
    encoders.encode_base64(part)
    part.add_header('Content-Disposition', "attachment; filename= %s" % filename)
    
    msg.attach(part)
    
    server = smtplib.SMTP('smtp.gmail.com', 587)
    server.starttls()
    server.login(email, password)
    text = msg.as_string()
    server.sendmail(email, send_to_email, text)
    server.quit()

thanks