I am running a cron job that will pull data from facebook and stores in the database using whenever
gem which is working properly.
I have monit(a monitoring tools) installed in the server and now i would like to monitor that cron job.
I searched a-lot but got nothing handy.
What i have learnt that i need to create a pid
file for the cron job using bash script and then i need to use that pid
file in the monit
configuration.
Can any one tell me how to create pid
file using bash script
for the cron job so that i can use that pid
file in the monit.
i am using rvm
ruby 2.2.3 and rails 4.1.2.