There's not one "beta" for a stock - it's always relative to some benchmark. Typically the "beta" that is published is relative to some very broad benchmark like the S&P 500, with the theory that it is "close enough" to the entire market to calculate an accurate beta. In other words, if every single stock in the US were used instead of the S&P 500, bet wouldn't change materially.
You can use a sector index as a benchmark if you want to compare a stock's risk to its sector, but published betas typically use a broader index if they don't specify the benchmark used.
Time frame is a better question, and typically beta should match your investment time frame - meaning if you are investing for 10 years, then use a 10-year beta.
I have always considered beta more of a directional measure that focusing on hyper-accuracy. Do I care if a stock has a beta of 2.3 versus 2.6? Not really - I just know that both are about twice as "risky" as the market overall.