BEDFORD — Six years after losing both of her parents to cancer, Emily Rivinius will lace up her sneakers and run 26.2 miles.

“My father never wasted a moment of his day, and I have tried to have that mindset through all of this training and fundraising. I just have to do it,” Rivinius said of the 123rd Boston Marathon.

Rivinius, 38, of Bedford is running in memory of her parents, Jay and Michelle Driscoll. Her mother died in 2013 after fighting advanced leiomyosarcoma, and her father died six months later, also in 2013, after a battle with multiple myeloma.

“They both had this amazing will to live. They were trying to live for us,” said Rivinius, who has two brothers and three children of her own. “We call them the legacy,” she said of her parents’ nine grandchildren.

Rivinius is one of 22 individuals from Bedford registered to run in the marathon, and she joins a crew of 365 runners from New Hampshire registered for the Patriots Day event.

A total of 30,000 runners are expected to participate in the race, which travels from Hopkinton, Mass., to Copley Square in Boston.

Rivinius is one of many charity runners with the Dana-Farber Marathon Challenge team, and she has managed to raise more than $10,000 throughout the past four months — money that will be used for cancer research and clinical trials.

“Yes, there is the running component to this journey, but to me, the fundraising part is just as important,” said Rivinius, who was the primary caregiver for both of her parents when they were diagnosed with cancer, and during their final days.

Both of her parents received service through the Dana-Farber Cancer Institute, and it is because of that organization’s dedicated team of medical professionals that both of her parents were able to prolong their lives despite the final prognoses, she said.

Rivinius said that every penny that goes toward the Claudia Adams Barr Program in Innovative Basic Cancer Research at Dana-Farber helps to prolong the lives of other moms, dads, daughters and sons suffering with cancer.

This will be Rivinius’ second Boston Marathon run. She ran the race in 3 hours, 43 minutes last year, but is hoping to run it in about 3 hours, 15 minutes this year, although she admits that the forecast of cold and rainy weather could slow her down.

Regardless, Rivinius says she is excited about the challenge, and feels more prepared than she did last year at this time.

“I am going to take it easy and take it all in, but I am competitive in nature so it will be challenging,” she acknowledged.

Rivinius has been running about 40 miles a week preparing for the marathon, trying to fit in her training whenever she can.

“Running is really a mindset. Training has been squeezed into these little pockets throughout the day,” she said, explaining that family time has remained a priority for her throughout the process.

Some other Bedford runners competing in the race include 18-year-old Alexandra Finocchiaro and Jennifer Mortimer, the director of client relations and human resources at Millennium Running.

“Each year, the Boston Marathon brings people from all backgrounds together to celebrate athletic excellence and community spirit,” Tom Grilk, chief executive officer of the Boston Athletic Association, said in a statement. “We at the BAA are eager to welcome participants, spectators and volunteers from all across the globe to the Greater Boston area. Being able to showcase our community, in particular the eight cities and towns that comprise the Boston Marathon route, is truly an honor.”

Of the 30,000 official participants in the race, there are more than 7,600 runners traveling from 118 countries, according to a news release. Overall, more than $36 million is expected to be raised by participants competing for various charities and nonprofit organizations, according to organizers.