Anywhere between 30 minutes to a few hours before cooking. Applying the rub in advance allows the seasonings to work their magic and inject flavor into the meat. Whether you plan to cook your pork right away or within 24 hours, it’s best to refrigerate the meat to avoid any foodborne illnesses.