LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I create a cron job that will run everyday at 12:20am? and 5:20 AM ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-create-a-cron-job-that-will-run-everyday-at-12-20am-and-5-20-am-4175493024/)

wireshark11 01-29-2014 02:53 PM

How do I create a cron job that will run everyday at 12:20am? and 5:20 AM ?
 
Currently running Ubuntu 12.04 LTS 64-bit

Any Help Pls

Kustom42 01-29-2014 03:02 PM

This will answer your questions related to cron and example configs: http://www.adminschoice.com/crontab-quick-reference/

naishal0748 01-29-2014 03:19 PM

You can type command "crontab -e" in terminal, which will open crontab file in vi editor.

In that file, you can use following line to run your job

1) To run job everyday at 12:20 AM
20 0 * * * "command or script to be executed"

2) To run job everyday at 5:20 AM
20 5 * * * "command or script to be executed"

wireshark11 01-29-2014 03:34 PM

The crontab for "everyday at 12:20am and 5:20am

* 12 * * * /usr/bin/wget --spider "http://www.domain.com/cron.php >/dev/null 2>&1

* 5 * * * /usr/bin/wget --spider "http://www.domain.com/cron.php >/dev/null 2>&1

Pls This examples Not Working

Thx

Kustom42 01-29-2014 03:37 PM

Please check your syntax against the reference document, your cron job is set to run at 6 AM and 1 PM every day. The hours run 0-23 not 1-24, minutes run 0-59 instead of 1-60 and so on.

jamison20000e 01-29-2014 03:51 PM

Hi. /etc/ has /corn.daily, .hourly, .monthly, and .weekly preset configs to modify and go... best wishes and have fun. :)

Kustom42 01-29-2014 03:55 PM

Quote:

Originally Posted by jamison20000e (Post 5107684)
Hi. /etc/ has /corn.daily, .hourly, .monthly, and .weekly preset configs to modify and go... best wishes and have fun. :)

None of these will allow for a special backup time. These run at a preset time they are just blank files.

Habitual 01-29-2014 05:28 PM

anyone that cares, can test their crons at http://www.dataphyx.com/cronsandbox/cronsandboxgui.php

Tadaen 01-29-2014 08:08 PM

20 0,5 * * * /cron/job/to/run

http://stackoverflow.com/questions/1...pm-for-example


All times are GMT -5. The time now is 08:28 AM.