Forums

Weekly scheduled task

Hi

What would be the easiest way to run a scheduled task weekly? I see the current options are for daily/hourly.

I want to run a script each Monday morning only.

Ta Richard

Figured it out.

import datetime
today = datetime.date.today()
weekday = today.weekday()

if (weekday == 0):
    run my script

: )

sounds like that'll work!

Did it work?

Sure did :)

:-)

Where to you place that script for a Monday morning run? The command line in the Scheduled Tasks bar doesn't seem to allow multiple lines of code.

Put it in a file and then execute the file from the scheduled task.