I am pretty new to unix systems and their workings. Is there any way to schedule a cron job in unix which runs on every day 12:00 AM and checks if the day is Thursday it stops a service and if the day is Friday it starts the service again?
You're overcomplicating it by trying to make one job that conditionally does two things. You want one job to start the service on Thursday, and another to start it on Friday, as in the following
0 0 * * 4 service myspiffyservice stop > /dev/null 2>&1 # stop myspiffyservice on Thursday 0 0 * * 5 service myspiffyservice start > /dev/null 2>&1 # start myspiffyservice on Friday
If you are talking about executing a job rather than starting or stopping a service, this can also be handled by one cron job that only runs on nonThursdays:
0 0 * * 0-3,5-6 /path/to/myspiffyjob > /dev/null 2>/dev/null # Run spiffy job on non-Thursdays
The above schedule translates to 'At 00:00 on every day-of-week from Sunday through Wednesday and every day-of-week from Friday through Saturday'.