The Chicago Cubs have agreed to a deal with free-agent right-hander Kendall Graveman, a source told ESPN’s Jesse Rogers on Saturday.

The 28-year-old Graveman, who is still rehabbing after having Tommy John surgery in late July, will receive at least $575,000 for 2019 and has a $3 million club option for 2020, according to multiple reports.

The signing is mostly focused on 2020, but the Cubs have not ruled out Graveman returning late in the 2019 season, a source told Rogers.

Graveman, who was the Opening Day starter for the Oakland Athletics, finished the season with a 1-5 record, 27 strikeouts and a 7.60 ERA in 34 1/3 innings.

He was 0-5 with an 8.89 ERA in his six starts before getting sent down to Triple-A Nashville on April 26. He returned on May 11, getting his only win of the season against the New York Yankees.

Overall, Graveman has started 78 games over the past four seasons with the A’s, compiling a 23-29 record with a 4.38 ERA. He entered the majors as a late-season call-up with the Blue Jays in 2014.