Solved

additional column in crontab file?

Posted on 2014-01-22
2
186 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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