Yes it can. Computers are made to work uninterruptedly tho the usage of SO may not be flawless scpecially if you use windows and are doing weird stuff wich can cause some services to die, in this case restarting the computer would be good but yeah theorically a server can run for 1000 years without problems if your sources and datapack aren't shitty