How to trouble shoot if Crontab is not working


Hi guys,

Please help below topics?

1:How to scheduled crontab every day at 11 only weak days?
2:How do you trouble shoot if crontab is not working?
3:What is the crontab log location?

6:How to resolve DNS issues?
7:How to kill 100 process at a time?with out pasting all PID’s manually
8:How to check memory utilizations and how to see core memory?
9:what is shee bang statement in shell script explain deeply?
10:Explain Netstat command?
12:How to find files based on UID?
13:What is UID and GID?
14:write a shell script 1 to 10 numbers and 1 should be print 2 times?

16:How to login server A to Server B without known user name and passwd?
17:How to know server service is running or not from server B?


You can generated crontab with this:

you can see the log on this file:

grep CRON /var/log/syslog


Open the file


Find the line that starts with:


uncomment that line, save the file, and restart rsyslog:

sudo service rsyslog restart

You should now see a cron log file here:


I generally configure cron for execute whatever command on one second and preview on:

tail -f /var/log/syslog | grep CRON

for DNS issue check this file:

lucas@server:~$ cat /etc/resolv.conf

I don't know why you want to kill hundred processes, but I use: pkill process or kill -9 process or write a shell for get the pid's and kill all.

for memory utilization you can use this:
free -m or install htop for more details.

You can write a shell with whatever sheebang, like this:

#!/bin/sed -f
#!/bin/awk -f

for more details view

nestat is for connections of networking, for more details view:
man netstat

GID: group identity
UID: user identity

example user root always have the UID : 0

i hope it helps you :slight_smile:


Thanks a lot Luk4z. for your information.

This will helped me a lot.

If you don’t mine can you tell me the answer for below questions?

1:in ps -ef what is option e and f

2:What are the critical issues you faced and how you resolved?----this question is asking all most all interviews can you please post 2 or 3 critical issues and answers.

Which I posted all questions are asking in interviews.I am trying job for Linux Application support profile if you have any links plz share me @

Thanks once again for your time


Hello ravibabu4u

  1. To set cron tab there is particular hierarchy in case of yours
    minutes hour Day Of month Month of day Day of week
    00 11 * * * command that you want to execute

  2. In case a cronjob is not running you need to check the entry whether you have done them in correct format or not and the command that you want to execute is correct or not. For more go to following link

  3. Cron logs on CentOS 6 are located in /var/log/cron by default. This only logs the execution of commands, not the results or exit statuses. The output of the executed command goes to the user’s
    mail by default (root’s mail in this case). An alternate email can be specified by the MAILTO variable inside of the crontab.

  4. To resolve issue you can make entry of site with ip in /etc/hosts/ file.

  5. To kill process you need to mention pid or process name. To kill more than one process at a time
    sudo kill -9 pid1 pid2 … … …

  6. To check free memory you can use command
    free -m and df -h

  7. For deep knowledge of Shee bang use following link

  8. In computing, netstat (network statistics) is a command-line network utility tool that displays network connections for the Transmission Control Protocol (both incoming and outgoing), routing tables, and a number of network interface (network interface controller or software-defined network interface) and network protocol statistics.

  9. To find files based on uid use folloing command
    find location where you want find(/var/log) -uid 1000

  10. UID is User id and GID is Group id

  11. To login server from A to B without password you need to generate a ssh key for servewr a and save that key on server B in .ssh file. For more details follow the link:-

Hope it helps you…


Links for study:


Thank You very much Lik4z_7

These links is very help full to me.

Thanks for your time.