A couple basic things to check:
If not opening spray all pivot joints with WD49 to clear any dirt.
If not closing, the small magnetic contact on the screen door may be out of alignment, as well as the dirt issue.
You didn't say if you hear the motor trying to run or not, if yes, then it may be a stripped gear. if not, check the ground wire as it is a common point of failure.