  We examine the second law of thermodynamics in the context of horizon
cosmology, in particular, whether the change of total entropy (i.e. the sum of
the entropy for the apparent horizon and the entropy for the matter fields)
proves to be positive with the cosmic expansion of the universe. The matter
fields inside the horizon obey the thermodynamics of an open system as the
matter fields has a flux through the apparent horizon, which is either outward
or inward depending on the background cosmological dynamics. Regarding the
entropy of the apparent horizon, we consider different forms of the horizon
entropy like the Tsallis entropy, the R\'{e}nyi entropy, the Kaniadakis
entropy, or even the 4-parameter generalized entropy; and determine the
appropriate conditions on the respective entropic parameters coming from the
second law of horizon thermodynamics. The constraints on the entropic
parameters are found in such a way that it validates the second law of
thermodynamics during a wide range of cosmic era of the universe, particularly
from inflation to radiation dominated epoch followed by a reheating stage.
Importantly, the present work provides a model independent way to constrain the
entropic parameters directly from the second law of thermodynamics for the
apparent horizon.
