There are two related settings: Scheduled Charging and Scheduled Departure. Both features have recently been updated to be more flexible.
You can only set Scheduled Charging and Schedule Departure from within the Tesla vehicle via the Charging screen. You can't currently set Scheduled Charging or Scheduled Departure at all using the Tesla app.
Schedule Charging
Scheduled Charging enables you to charge during a defined charging window (this window may coincide with an off-peak utility rate period.) When you first enable Scheduled Charging you enter the starting time of the Scheduled Charging window, say Midnight, and the end time of the Scheduled Charging window. (The latest version of the Tesla software enables you to set Scheduled Charging to start charging as soon as the start of the charging window if you want.) Most Tesla owners prefer to let Scheduled Charging automatically calculate when to start charging to complete charging within approximately 15 minutes of the end of the Scheduled Charging window (the time when presumably the off peak rate period ends or close to when you usually leave your house in the a.m.)
Example: If your off-peak rate period ends at 0700 then the Tesla will always complete charging by approximately 6:45 a.m. When Scheduled Charging is set it runs for all 7 days of the week. (Prior to the recent Tesla software update Scheduled Charging did not enable charging starting at the beginning of the Scheduled Charging window, assumed that the off-peak window ended at 0600 local time with no ability to change the end of the off-peak time.) Now it is possible to either start to charge at the beginning of the off-peak window or to automatically complete charging at the end of the off-peak window even if the off peak window does not end at 0600.) The reason to have Scheduled Charging complete as late as possible is that in winter the battery will already be partially warmed by the charging session making it more efficient and faster to precondition the battery pack for driving.
Scheduled Departure
Scheduled Departure is also accessed from the Charging screen. You toggle the screen option from Scheduled Charging to Scheduled Departure by pressing the screen button. Scheduled Departure can be set for Monday through Friday or for All Days. When Scheduled Departure is set On the Tesla vehicle will automatically start Preconditioning the Tesla vehicle starting 20 to 30 minutes prior to the specified departure time (depending on the outside temperature.) At colder temperatures preconditioning will also automatically warm the battery pack. Schedule Departure can now be set to run even if the Tesla vehicle is not plugged in. (Some people charge at work during the work week so they may only charge at home on the weekend.)
There are still use cases where Scheduled Charging and Scheduled Departure may not meet your needs. I.e. if the off-peak rate period ends at 0600 but you normally don't leave your house until 0730 then if you have Scheduled Departure set On the Tesla vehicle will start preconditioning, warming the battery pack and the passenger cabin starting at approximately 0700 (this is outside of the off-peak rate period) so if the Tesla is plugged in then the price per kWh you pay to precondition will be higher.