How Do I Manually Run Cron Jobs on an Ubuntu Server?

Ubuntu server and desktop operating systems, along with other Linux distribution and UNIX systems, use the cron daemon to automatically run processes on a schedule. Cron runs a series of scripts that are located in specific directories at specified intervals. For example, cron runs each script located in the cron.daily directory once per day. Cron jobs are normal scripts, so you can also manually execute them to make sure they're working correctly or run system administration tasks at a specific time.

Instructions

    • 1

      Type "sudo run-parts cron.daily" at the terminal prompt to run the daily cron jobs. You can also type "cron.hourly," "cron.weekly" or "cron.monthly" to run the hourly, weekly or monthly cron jobs instead.

    • 2

      Press "Enter."

    • 3

      Type your password at the password prompt and press "Enter."

Tips & Warnings

  • You can also manually run a single cron job by executing its script directly. For example, run the logrotate cron job that runs daily by typing "sudo /etc/cron.daily/logrotate" at a terminal prompt and pressing "Enter."

Related Searches:

References

Comments

Related Ads

Featured