Both sentences are improbable but correct.
Which one is grammatically correct?
A. Update the year in the copyright notice automatically every year.
B. Update the year in the copyright notice automatically each year.
Context:
It's an order to a computer. A person cannot do that automatically of course.
Both sentences are improbable but correct.
I am not a teacher.
It's an order to a computer? Is this a particularly pedantic computer? If not, I wouldn't worry about it.
Although I'm sure things have changed rather a lot since I did some computer coding in about 1983, I'm pretty sure that's not the kind of wording that would be used in a command to a computer!
Remember - if you don't use correct capitalisation, punctuation and spacing, anything you write will be incorrect.