  With great advance of ground-based extensive air shower array, such as LHAASO
and HAWC, many very high energy (VHE) gamma-ray sources have been discovered
and are been monitored regardless of the day and the night. Hence, the Sun and
Moon would have some compact on the observation of gamma-ray sources, which
have not been taken into account in previous analysis. In this paper, the
influence of the Sun and Moon on the observation of very high energy gamma-ray
sources when they are near the line of sight of the Sun or Moon is estimated.
The tracks of all the known VHE sources are scanned and several VHE sources are
found to be very close to the line of sight of the Sun or Moon during some
period. The absorption of very high energy gamma-ray by sunlight is estimated
with detailed method and some usefully conclusions are achieved. The main
influence is the block of the Sun and Moon on gamma-ray and their shadow on the
cosmic ray background. The influence is investigated considering the detector
angular resolution and some strategy on data analysis are proposed to avoid the
underestimation of the gamma-ray emission.
