25

There are currently 18,193 questions on Stack Overflow with the tag. Are questions about cron/crontab topical for Stack Overflow, or should they be redirected to another site such as Super User or Unix & Linux? (Both sites have their own [cron] tags with a fair number of existing questions.)

A weak argument in favor of keeping them on Stack Overflow is that cron implements a tiny programming language. A stronger argument IMHO is sheer inertia. The counterargument is that such questions are about using software, not about writing it.

3
  • 5
    I think questions about using the cron-syntax in a programming language is on topic. E.g. using spring-scheduling with cron expressions for Java
    – Lino
    Commented Aug 20, 2020 at 7:23
  • 6
    A good indicator of wrong site: if canonical answer to the problem is located on another site.
    – Sinatr
    Commented Aug 20, 2020 at 10:01
  • 2
    Unix is designed to blend the boundary between user and programmer. Mistakes will be made.
    – Joshua
    Commented Aug 22, 2020 at 15:45

3 Answers 3

60

IMHO, calling crontab syntax a programming language makes a mockery of the term. By that logic, almost any configuration file would be considered a programming language (e.g. /etc/passwd is effectively switch statements saying what shell to run based on the login username). I've frequently referred questions about things like iptables rules to unix.stackexchange.com, but they have more right to be called programming than crontab lines.

I don't think the sheer number of questions is an indicator that they're appropriate.

  • Many of the thousands of [cron] questions are old (particularly the ones with many upvotes), and may predate the creation of the other Stack Exchange sites.
  • Some of the questions with the [cron] tag are not even about cron. They added the tag because they happened to be using cron to run the program that the question is really about.

Legitimate SO questions about cron should relate to how to write programs that are run using it, not the basic process of using cron. A good example of this is How to simulate the environment cron executes a script with?. Other appropriate questions are about writing programs that interact with cron, e.g. How can I programmatically create a new cron job?

Admittedly the boundaries between these 3 sites has always been a bit fuzzy. But I think if your question is just about how to fill in the first 5 fields of a crontab entry, or "why isn't my cron job running?", it's not really a programming question and doesn't belong on SO.

Just this side of the SO boundary are questions about doing tricky scheduling that isn't directly supported by the crontab syntax, e.g. "first Monday of every month". This usually involves adding code to the script that's run from the crontab, so it slips into the programming world and is on-topic.

19
  • 3
    I agree here. Most questions are of the type My cron does not work, which by default is answered by this question. If that does not answer the question, it is a shell script problem. There are however a handful of interesting questions which do belong on SO. Two are already mentioned above, others I consider useful are questions of the form How do setup crontab to schedule something in a way it is not designed to do (Eg. this this)
    – kvantour
    Commented Aug 20, 2020 at 9:54
  • @kvantour Thanks, I've updated the answer to mention those kinds of questions.
    – Barmar
    Commented Aug 20, 2020 at 14:44
  • 5
    As an asdie, the SO cron wiki is fantastic and covers many common problems (different environment, % escaping, debugging strategies...) Commented Aug 20, 2020 at 14:57
  • Quite true, I was looking there to see if it answered this question. It doesn't, but it's practically a canonical answer all by itself.
    – Barmar
    Commented Aug 20, 2020 at 14:59
  • 3
    A good rule of thumb: if you can remove cron of the question and the issue stays, it's not a cron question.
    – Braiam
    Commented Aug 21, 2020 at 2:24
  • 1
    To play devil's advocate, the written policy specifically allows questions about "software tools commonly used by programmers." Cron is definitely a software tool commonly used by programmers. OTOH, if there's consensus that cron questions are off topic, isn't that a sign that the policy should be revised to be more precise?
    – senderle
    Commented Aug 22, 2020 at 11:44
  • @senderle Windows is also a tool commonly used by programmers, that doesn't make generic WIndows question on topic. There's a "and is a practical, answerable problem that is unique to software development" which actually defines the scope of the site.
    – Braiam
    Commented Aug 22, 2020 at 13:23
  • @Braiam Isn't the analogy to Windows kind of a stretch here? It's true that cron solves problems that are not strictly unique to software development, but almost every professional developer I know has needed to learn the basics of cron at some point in the course of their programming work. To me the real question is whether migrating / redirecting cron questions is going to serve the needs of software developers who use Stack Overflow. I don't know the answer to that for sure, but it certainly doesn't seem cut-and-dry to me.
    – senderle
    Commented Aug 22, 2020 at 15:41
  • @senderle nope, it's the correct analogy since your statement is open ended, it has no limits. Only when accompanied with the conditional it has boundaries. That's why there has been several discussions about excel, word, vim, etc. The tool by itself doesn't mean it is automatically on topic, a tool plus tasks does (sometimes the task itself is enough, but it has to be practical).
    – Braiam
    Commented Aug 22, 2020 at 15:50
  • @senderle if you want to frame it into the cron topic: is cron by itself enough to be on topic? No. Using crontab to edit a file is squarely a system administrator task. Using an api/library to install a cron task (ie. debian cron debhelper which is a software developer task, in the way it packages the software it develops) may be.
    – Braiam
    Commented Aug 22, 2020 at 15:55
  • @Braiam you can infer boundaries from the functional scope of the program under consideration. The scope of Windows is much larger than the scope of cron. So I disagree that unqualified statements about the topicality of Windows questions and cron questions are equally open-ended.
    – senderle
    Commented Aug 22, 2020 at 16:38
  • @senderle again, you are missing the point. The task sets the scope, not the tool. A site for programmers, have no place for not programming questions.
    – Braiam
    Commented Aug 22, 2020 at 19:04
  • @senderle, umh, what does a programmer/software developer need cron for? A sysadmin, surely (and they often need some programming skills too), but just for software development? Or are we talking something like scheduling nightly builds or taking backups? Though they'd still seem to sysadmin tasks, even if relevant to software development.
    – ilkkachu
    Commented Aug 22, 2020 at 19:40
  • Put another way: A programmer using cron to run one of his programming tasks on a schedule is no different from a non-programmer running some other task on a schedule. If the answer is the same for a programmer and non-programmer, it's not programming-related. @senderle
    – Barmar
    Commented Aug 22, 2020 at 21:32
  • 1
    @Scratte, sorry. it's the text-only communication and the associated lack of tone and such context. :)
    – ilkkachu
    Commented Aug 23, 2020 at 13:33
7

As other have mentioned, there are questions that can be on-topic and off-topic with the tag cron. So it might be reasonable for it to stay.

However, I would like to add that even if it weren't getting it burinated (or removed from the site) is unlikely, since there are over 18,000 questions. As rene has said (or perhaps some other editor. I didn't look through all 50+ revisions to see who exactly added this exact language):

Be realistic

If a tag has more than 1000 questions, the review work you and the community have to complete is enormous. You would need to fulfill the additional criterion:

We would need to prove it's causing a lot of extra harm, such as attracting more off-topic questions than on-topic. I'm not sure that case has been made yet. However, that certainly doesn't mean it can't be made in the future.

2
  • 2
    I don't think he was suggesting burninating the tag. His question was prompted by me voting to close a cron question as off-topic.
    – Barmar
    Commented Aug 21, 2020 at 22:26
  • @Barmar Indeed. I actually don't have an opinion one way or the other. Commented Aug 23, 2020 at 1:15
4

When looking at the questions, I find that some of them could well be migrated to ServerFault, but many - perhaps most - are about cron-related automation with additional programming aspects.

Examples:

so I don't think you can generalize. More active migration off site for the properly cron-only questions sounds like a right thing to do.

5
  • The second question you linked to isn't about cron at all. Commented Aug 21, 2020 at 10:19
  • 1
    @IInspectable: Well, it's tagged cron and has cron in the title and was one of the newest cron questions. Regardless, even if that's the case - that also demonstrates my point.
    – einpoklum
    Commented Aug 21, 2020 at 11:01
  • 1
    I was under the impression, that the point you were trying to make is, that certain questions about cron were on-topic. Picking a question that's on-topic, but isn't about cron doesn't seem to support the idea, that some cron questions are on-topic. Commented Aug 21, 2020 at 15:40
  • @IInspectable: The idea is that many/most cron questions don't fit the characterization by OP; and that they should not be redirected to another site. Mis-tagged questions are also an example of that, even if not exactly the one I brought up.
    – einpoklum
    Commented Aug 21, 2020 at 15:48
  • The question is whether questions about cron belong on SO, not specifically about the [cron] tag. The tag is just an easy way to find questions that fit the discussion, although there are also false positives.
    – Barmar
    Commented Aug 21, 2020 at 22:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .