Solved

additional column in crontab file?

Posted on 2014-01-22
2
183 Views
Last Modified: 2014-01-24
Hi

I'm looking at a list of cron jobs in the file created by crontab and they mostly seem to have the standard format

minute hour day_of_month month day_of_week command

However some of them have an extra word before the command. Do you have any idea what this is. I cant really post it as it might be sensitive but it would be something like

5 1 *** some_word command

Is that issuing the name of the user calling the command? Sorry i dont have access to a system at present to check this out for myself. I'm only on windows laptop reading some code

Thanks
0
Comment
Question by:andieje
2 Comments
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 250 total points
ID: 39801613
Some crontab formats (ie: vixie cron) allow for specifying the user to run the command as, eg:

5 1 * * * oracle /some/command

would run /some/command as the oracle user.

Using the traditional crontab format, the cronjob entry would be

5 1 * * * su oracle -c "/some/command"
0
 
LVL 8

Accepted Solution

by:
Surrano earned 250 total points
ID: 39802348
The problem with this format is that it can't distinguish between "user oracle should execute /some/command" and "command oracle should be executed with parameter /some/command"

So whoever invented this must have made this field mandatory which is normally redundant since the "standard" name of a crontab file matches the username who should execute these jobs.

My best bet is that if you don't recognise this "some_word" as a user name then it must be a command name (without an absolute path is another big NO-NO in crontab)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This Windows batch file is useful for organizing image files from a digital camera or other source, but can have many other uses.  It simply renames the file(s) to match their create date.  For example, if you took a picture today at 1:40pm and the …
Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now