When I had this problem, I'm sick so cannot go to school, I would really treat them as sick. Bed or on the couch under a blanket, little or no TV, could read books etc, no special snacks, unless I knew they were really sick, playing kept to a minimum etc.

They soon learnt that staying home for the 'fun of it' was boring.

I know there are times when issues at school happen but you will learn the difference. Most schools these days have people to talk to so use them. Even if it's you who talks to them, you will get some ideas of what is going on and how to deal with them. They will also most likely keep on eye on your child and step in if needed.