Sorry if I am just dumb about this but I am currently trying to set up my raspberry pi to start a script at startup but I cant seem to figure out which is better to use, Crontab or init.d . I can't seem to find out what the difference between the two is. If someone can help me figure out which is best to use and easiest to setup that would be great.

Thanks in advance and sorry if I don't respond to the thread right away! (Also sorry if this question is not detailed enough and if it is in the wrong forum/stack thing. I am new. please dont kill me :D)


They serve different purposes. crontab (or it's equivalent machinery) is used to run tasks at fixed intervals. For example, run some cleanup tasks in the wee hours of the morning, when no users are around, init.d (and similar machinery) is for organizing tasks to run when the machine starts up.

In today's machines both functionalities are subsumed by systemd (as the requirements are very similar).

| improve this answer | |

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.