Cook the pasta in salted water according to the instructions on the packet until al dente. In the meantime, mix the eggs with the cream and herbs well. Season with salt and pepper.
When the pasta is ready, cut the ham into fine cubes and fry lightly in a large pan with the oil.
Then add the drained spaghetti and the herb, egg and cream mixture to the pan. Fold in well and heat briefly over medium heat. Grate the parmesan and season again with salt and pepper if you like.
The whole thing can of course also be done with fresh herbs, this only increases the time required.