Using millis() to control sequence timers

I'm using and esp8266. I want to control the state of 4 different outputs based on timers. The way i see it,

timer1 is on for 10 seconds, then off for 20 seconds. then timer 2, timer 3 , timer 4, then back to timer 1 etc. I'm struggling with the logic about how to write the code. I would also like to stop/start a specific timer and some random times manually. since the code don't do much else i don't mind using millis() for the timing don't have to be perfect down to the last second just "close". I think i'm overwhelmed by the options to do this task. I really need some guidance please. can someone please help me out here

this seems to work maybe i can work with this,

void loop() {

  if (timerState == 1) {
    if (timer1State == 0 ) {
      Serial.println("ton");
      digitalWrite(relay[0], LOW);
      digitalWrite(relay[1], HIGH);
      digitalWrite(relay[2], HIGH);
      digitalWrite(relay[3], HIGH);
      timer1State = 1;
      timer1onMillis = millis();
    }
    if (millis() - timer1onMillis >= timer1OnTime && timer1State == 1) {
      digitalWrite(relay[0], HIGH);
      timer1State = 2;
      timer1offMillis = millis();
      Serial.println("toff");
    }
    if (millis() - timer1offMillis >= timer1OffTime && timer1State == 2) {
      timerState = 2;
      timer1State = 0;
      timer1offMillis = millis();
      Serial.println("next timer");
    }
  }
  if (timerState == 2) {
    if (timer2State == 0 ) {
      Serial.println("t2on");
      digitalWrite(relay[0], HIGH);
      digitalWrite(relay[1], LOW);
      digitalWrite(relay[2], HIGH);
      digitalWrite(relay[3], HIGH);
      timer2State = 1;
      timer2onMillis = millis();
    }
    if (millis() - timer2onMillis >= timer2OnTime && timer2State == 1) {
      digitalWrite(relay[1], HIGH);
      timer2State = 2;
      timer2offMillis = millis();
      Serial.println("t2off");
    }
    if (millis() - timer2offMillis >= timer2OffTime && timer2State == 2) {
      timerState = 3;
      timer2State = 0;
      timer2offMillis = millis();
      Serial.println("next timer2");
    }
  }
  if (timerState == 3) {
    if (timer3State == 0 ) {
      Serial.println("t3on");
      digitalWrite(relay[0], HIGH);
      digitalWrite(relay[1], HIGH);
      digitalWrite(relay[2], LOW);
      digitalWrite(relay[3], HIGH);
      timer3State = 1;
      timer3onMillis = millis();
    }
    if (millis() - timer3onMillis >= timer3OnTime && timer3State == 1) {
      digitalWrite(relay[2], HIGH);
      timer3State = 2;
      timer3offMillis = millis();
      Serial.println("t3off");
    }
    if (millis() - timer3offMillis >= timer3OffTime && timer3State == 2) {
      timerState = 4;
      timer3State = 0;
      timer3offMillis = millis();
      Serial.println("next timer3");
    }
  }
  if (timerState == 4) {
    if (timer4State == 0 ) {
      Serial.println("t4on");
      digitalWrite(relay[0], HIGH);
      digitalWrite(relay[1], HIGH);
      digitalWrite(relay[2], HIGH);
      digitalWrite(relay[3], LOW);
      timer4State = 1;
      timer4onMillis = millis();
    }
    if (millis() - timer4onMillis >= timer4OnTime && timer4State == 1) {
      digitalWrite(relay[3], HIGH);
      timer4State = 2;
      timer4offMillis = millis();
      Serial.println("t4off");
    }
    if (millis() - timer4offMillis >= timer4OffTime && timer4State == 2) {
      timerState = 1;
      timer4State = 0;
      timer4offMillis = millis();
      Serial.println("next timer4");
    }
  }
}

there seems to be 2 basic approches.

timer1 run (10 sec) off (20 sec) pass to timer 2
timer2 run (10 sec) off (20 sec) pass to timer 3
timer3 run (10 sec) off (20 sec) pass to timer 4
timer4 run (10 sec) off (20 sec) pass to timer 1

this would be a cut and paste and you would manually write the code to set/change times.
you could make a menu and each run and off time could be set from a menu without having to upload a program each time.

if you know that this is going to run like christmas lights and you don’t mind setting the explicit times

you could create a counter with the timer.

if ( millis()-then >=1000){
count++ ;
then = millis()
}

that increments count by 1 for each second.

output1=HIGH; // sets all the units OFF at this stage
output2=HIGH;
output3=HIGH;
output4=HIGH;

if (count > 0 && < 10 ) { output1=LOW ; } // only turns the ON that applies to ON
if (count > 30 && < 40 ) { output2=LOW ; }
if (count > 60 && < 70 ) { output3=LOW ; }
if (count > 90 && < 100 ) { output4=LOW ; }
if (count > 120 ) (count = 0; } // rests to first unit

digitalWrite(relay1,output1); // writes to outputs
digitalWrite(relay2,output2);
digitalWrite(relay3,output3);
digitalWrite(relay4,output4);