What is the correct verb construct in the following sentence?

Scripts ____ under cron have an empty environment.

Cron is a program that runs scripts at scheduled points in time (e.g. every hour). So the verb should be passive and continuous, and since the action continues through the present I believe the correct form is the present participle: running. Is this correct?


"Scripts running under cron" sounds the most natural of those choices. But isn't the problem that the verb run isn't strictly appropriate?

Wouldn't "scripts scheduled by cron" be much better than any of them?

| improve this answer | |
  • 1
    Not in this context, since it is the cron daemon process that sets up the environment and starts the script, i.e. "runs" it. The sentence is concerned with the setting up and starting aspect more than the scheduling aspect. – thebjorn Nov 6 '12 at 17:04
  • @thebjorn: Then is "under" the wrong preposition? "Scripts run by cron" might be more accurate. – pdr Nov 6 '12 at 17:08
  • 1
    I believe "under" is used because the implementation of processes uses the terms parent-process and child-process, where the parent process (the cron daemon process) starts the child process (the script). Generally, although not in this particular case, child processes inherit their environment (and permissions etc.) from the parent process. I agree that "Scripts run by cron" would be easier to understand, without any loss of precision. – thebjorn Nov 6 '12 at 17:28

If you grep the system documentation for /\b[Rr][ua]n(?:ning)\s+under\b/, you will find that both run under and running under occur quite frequently.

I wouldn’t say there is any clear winner here between the past and present participles.

| improve this answer | |

If I were writing this, I'd probably use a different word altogether, e.g.:

Scripts executed by cron have an empty environment.

| improve this answer | |
  • 3
    Ick! Execute is a big long fancy word compared with run. – tchrist Nov 6 '12 at 23:19
  • Perhaps, but then my whole point was that run is probably not the best word to use here. – Andrew Lambert Nov 6 '12 at 23:29
  • hmmm...man says (as in Unix manual) cron = daemon to execute scheduled commands. I think though that the environment is not totally empty, it's just been "cleaned" to improve security. – Chris Nov 7 '12 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.