Scott Freidheim, the chief executive of CDI Corp., has resigned, the Philadelphia-based engineering staffing company said Friday. The company's chief financial officer, Michael Castleman, has been promoted to president and will serve as interim CEO. The company said Freidheim, 51, was leaving to pursue other non-competitive business interests.

Freidheim, 51, joined CDI as president and CEO two years ago, in August, 2014. Castleman came to CDI a few months later, in October, as Executive Vice President for corporate development and operations. He was promoted to CFO in March 2015. He was previously president of Kenmore, Craftsman and Diehard brands.

Last month, CDI reported a second quarter loss of $7.5 million. At $226.7 million, second quarter revenues were down 8.2 percent from 2015's second quarter. Both revenues and earnings declined over the last year. The company employs 900 and operates Management Recruiters International, a franchised-staffing organization.