Calling calendar function & task for loop