How do you create a job in SQL server 2008 R2 that will clear transaction logs?
You can use Ola Hallengren's  SQL Server Backup Solution.

Especially the CleanupTime will help you to delete the old backups (FULL / Diff or Transaction log backups).


  Specify the time, in hours, after which the backup files are deleted.