Yes it's possible if you have enough time for the project. Here is a way to use a 100 km diameter asteroid as a gravity tug that does repeated flybys of Jupiter and Earth. The idea is to move Earth out far enough so that it stays habitable as the sun gets hotter hundreds of millions of years in the future. So that's altering the Earth's lifespan in a positive way so that it can be habitable for longer.
Someone worked out, it only needs to do a flyby of Earth every 6,000 years to do the trick. So - every few thousand years as it approaches Earth or Jupiter you have to do some careful fine tweaking of its trajectory. But most of the time you can just forget it.
It works by transferring momentum from Jupiter to Earth. As Earth spirals out, Jupiter spirals in - but only slightly.
Of course you'd need some pretty awesome fail-safes - don't want to have any chance of something that big hitting Earth. It's nearly ten times larger and getting on for a thousand times heavier than the asteroid impact that ended the dinosaur era - which is amongst the largest meteorites to hit Earth for over 3 billion years - there were many at that size but nothing much larger.
For an idea for another way of doing this not involving flybys, see David Brin's Let's Lift The Earth!