You may become a Swiss tax resident if you spend at least 30 days in Switzerland while gainfully employed. Temporary interruptions do not interrupt the qualifying stay. This rule tracks days in Switzerland only; make sure the gainful-employment condition applies to you.
https://www.estv.admin.ch/estv/en/home/fta/swiss-tax-system/swiss-tax-system.html
Switzerland Tax Residence — 30 Days with Work
30 days in Switzerland while gainfully employed