1. A method for execution of a task in a grid computing system, the method comprising: identifying free time-slots and estimating durations of the free time-slots, by an edge device, for execution of a sub-task, wherein the free time-slots are indicative of an idle state of the edge device; determining, by the edge device, at least one computation capability parameter of the edge device for execution of a sub-task during the free time-slots; creating, by the edge device, an advertisement profile comprising at least one free time-slot, from amongst the free time-slots, and comprising the duration and the at least one computation capability parameter associated with the at least one free time-slot; and providing, by the edge device, the advertisement profile to grid servers in the grid computing system for partitioning a main task to create a sub-task executable by the edge device.