"replace crontab from file"


Herdo

Recommended Posts

I just had to make a change to crontab because an old script was interfering with some recent changes I had made.

 

Previously "crontab -l" displayed this:

 

# If you don't want the output of a cron job mailed to you, you have to direct
# any output to /dev/null.  We'll do this here since these jobs should run
# properly on a newly installed system.  If a script fails, run-parts will
# mail a notice to root.
#
# Run the hourly, daily, weekly, and monthly cron jobs.
# Jobs that need different timing may be entered into the crontab as before,
# but most really don't need greater granularity than this.  If the exact
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
# needs, feel free to adjust them.
#
# Run hourly cron jobs at 47 minutes after the hour:
47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
#
# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
#
# Run weekly cron jobs at 4:30 on the first day of the week:
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
#
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null

 

I found the old script located under /etc/cron.d/root so I used the "replace crontab from file" function with "crontab root".  This allowed me to use "crontab -e" to remove the old script and save.

 

However, now when I use "crontab -l", it's only displaying the "root" files crontab.  It looks like this:

 

# Generated docker monitoring schedule:
10 */6 * * * /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/dockerupdate.php check &> /dev/null

10 03 * * * /boot/config/plugins/cronjobs/medialist.sh >/dev/null 2>&1

# Generated system monitoring schedule:
*/1 * * * * /usr/local/emhttp/plugins/dynamix/scripts/monitor &> /dev/null

# Generated mover schedule:
30 0 * * * /usr/local/sbin/mover &> /dev/null

# Generated parity check schedule:
0 3 1 * * /usr/local/sbin/mdcmd check  &> /dev/null || :

# Generated plugins version check schedule:
10 */6 * * * /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugincheck &> /dev/null

# Generated speedtest schedule:
0 0 * * * /usr/sbin/speedtest-xml &> /dev/null

# Generated array status check schedule:
20 0 * * 1 /usr/local/emhttp/plugins/dynamix/scripts/statuscheck &> /dev/null

# Generated unRAID OS update check schedule:
11 0 * * * /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/unraidcheck &> /dev/null

# Generated cron settings for plugin autoupdates
0 0 * * * /usr/local/emhttp/plugins/ca.update.applications/scripts/updateApplications.php >/dev/null 2>&1

I guess I just want to make sure this is OK, and that this isn't going to mess anything up.  Obviously the "root" file crontab was working even though it wasn't loaded, so I'm guessing the hourly/daily/weekly/monthly scripts will still work, but I don't know.  Am I correct in assuming crontab is just used to manage and display cronjobs, and that they will work regardless of which crontab file is loaded?

 

EDIT: crontab -d and then a reboot reverted the crontab to the default settings.

Edited by Herdo
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.