I want to run a job three times per month from 3-5 pm.
Hence, I should add a line to /etc/crontab
which satisfy those needs.
How do I add this line known that I try the following, and it seems not correct:
0 15-17 1,10,20 3 * /home/kia/publish.sh
Your definition is correct, if the job is to run only in March, 3 times a day and on day 1, 10 and 20.
If not, use e.g.
to start at 3pm on day 1,10 and 20 or
to start on the first day each month at 3pm, 4pm and 5pm
And to change the crontab file, use the command