Rotating a 2D object instantly and continuously

I am making a game where to rotate 90 degrees clockwise instantaneously with a break of 4 seconds in between each rotation. Could anyone help me with this?

This is my code so far:

public class rotatingEnemyScript : MonoBehaviour
{
    void Update()
    {
        IEnumerator waiter()
        {
            float rotAmount = 90 * Time.deltaTime; 
            float curRot = transform.localRotation.eulerAngles.z; 
            transform.localRotation = Quaternion.Euler(new Vector3(0,0,curRot + rotAmount)); 
            yield return new WaitForSeconds(4);
        }
        StartCoroutine(waiter());
    }
}
void Start()
{
    RotateProcess();
}

private void RotateProcess()
{
    transform.localEulerAngles += new Vector3(0, 90, 0);
    StartCoroutine(WaitAndCallRotate(4));
}

IEnumerator WaitAndCallRotate(float time)
{
    yield return new WaitForSeconds(time);
    RotateProcess();
}