I am willing to write a smart contract which can automatically send ether to certain addresses like it needs to work continuously. is it possible?
I'm assuming from the question you want to know if there is a way to fund a contract so it performs as expected, because when it runs out of funds the program stops?
Disclaimer: I am part of Chainlink Keepers team. There is a contract we created called "balance monitor" that works on EVM chains. Cryptphil is correct, the contract can't run continuously, so we solved this using the automation service (Chainlink Keepers).
You deploy the balance monitor contract, fund it, and configure it to monitor the contract(s) that you want to fund, funding thresholds, and amounts to top up. You then register an Upkeep with Chainlink Keepers, point it to your deployed balance monitor contract, and fund the Upkeep.
What this will do is check off-chain whether your contract(s) are underfunded, and if so, the node in the network assigned to the upkeep at that time will transmit the funding transaction to the balance monitor contract on-chain.
Link to the contract for you to use, code is also open source on Github. https://docs.chain.link/docs/chainlink-keepers/utility-contracts/
If you mean something like that your contract should always send Ether after some time period, then no, this is not possible.
Because this would mean that your contract has to continuously run and, e.g., check for the blocktime which would cost you "infinite" gas and there would be no way to pack one execution of it in one block.
The way you could implement this behavior is to trigger your contract externally by some process you've implemented for your desired logic.
You can automate crypto payments with something like Gelato Ops.