1. A method for automatic task execution on a mobile device comprises: identifying, by a processor, one or more hardware resources on the mobile device; identifying one or more patterns for each of the one or more hardware resources; generating one or more composite patterns recognizable by the mobile device based on the one or more patterns; identifying one or more operations that can be performed via the mobile device; and receiving, via a user-interface, an association between at least one of the one or more patterns and the one or more composite patterns and an execution of at least one of the one or more operations.