That depends on the type of rental agreement and the terms agreed between tenant and landlord.
In a standard rental agreement for indefinite period, the landlord can only terminate based on a legal ground. Examples include urgent personal use—which must be clearly substantiated by the landlord—or non-payment by the tenant. This type of contract is based on the idea of a long-term rental relationship.
For a fixed-term agreement of up to two years (self contained housing), termination is more straightforward: the landlord only needs to send a timely notice to let the contract end on the agreed date.
In other temporary agreements, the landlord can give notice effective on the end date as stated in the contract. In that case, a notice period of three calendar months applies, plus one extra month for each full year the tenant has lived in the property (with a maximum of six months).
The key takeaway: always check the rental agreement for the specific arrangements. Not sure? Contact your rental agent or property manager.