1. A method for performing auto-cleaning in a printer, which is designed for printing on a substrate, the method comprising: periodically printing an auto-cleaner print on the substrate in a predetermined frequency; scanning the auto-cleaner print to obtain scanned image data of the auto-cleaner print; analyzing the scanned image data to determine extent of presence of artifacts indicative of dirt or ink residue; and based on the extent of presence of the artifacts modifying the frequency.