Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Manage different cronjobs with only one system user
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
make-crontab ============ Manage different cronjobs with only one system user. Authors: Volker Grabsch, Matthias Pohl Homepage: https://github.com/m-click/make-crontab Requires: GNU Make make-crontab is used for the crontab management on servers with several web applications, where each application can edit their own cronjob information. The key feature of this system is the need of only one system user (usually the apache user) to do this job. The applications can not only edit their own cronjob informationen but also add new cronjobs without mixing up the croninfo with the other apps. In the directory make-crontab a makefile and some content files containing the cronjob informationen of each application are located. These content files are named according to the name pattern 'crontab-app1', 'crontab-app2'. The content files can be written by the applications directly. If the makefile is called, it merges all files of the pattern crontab-* to one crontab file, which will then be installed as the crontab for the system user. The makefile checks for updates on the content files and installs the crontab only if required. In order to keep this process running, the makefile must be called regularly. For this purpose an additional crontab entry starts the make crontab procedure every minute. The crontab-* files may contain special variables: @NAME@ - file name without the 'crontab-' prefix @PWD@ - absolute path to the make crontab directory Assume the file 'crontab-app2' contains: 0 8 * * * /usr/lib/@NAME@/my-important-script.sh Then the final crontab will contain: 0 8 * * * /usr/lib/app2/my-important-script.sh