Change job expiration settings from within the job

Is it possible to change the Expiration time for a job from within the job itself?

My problem is as follows. I have a recurring job that runs every 5 minutes. It’s task is to check an sftp server and transfer new files if there are any.

And therein lies my problem. Most of these sftp sessions don’t have any files to transfer. As such I would like to come up with some way to make it easier to find jobs in the dashboard where there was actually something to transfer.

Initially I was thinking of adding a custom IState but the documentation on this seems to be somewhat incomplete. The documentation has a sample for creating a new state called FaultedState but no information on how to actually use it.

So I started thinking maybe I can expire the ‘junk’ jobs faster. As in if during the job no new SFTP files are downloaded set the expiration on the job to something really low (say 30 seconds or whatnot). It’s not ideal but I am a little out of ideas on how else to tackle this.

Surely this must be something others have faced too ?

No ideas at all on how to tackle this?