LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Scheduled tasks (https://www.linuxquestions.org/questions/linux-newbie-8/scheduled-tasks-548254/)

gubak 04-23-2007 05:59 AM

Scheduled tasks
 
Hi!
I use CentOS 4.4.
I want to run a program (it doesn't matter what kind of program)on my linux server every sunday at 9:00 AM .
How can I do that?
Are there any services on linux, like Scheduled Tasks in windows?

Thanks

hubbruch 04-23-2007 06:08 AM

Hi, try

Code:

$ man cron
:)

gubak 04-24-2007 12:17 AM

I've tried to set cron, but it doesn't work!
crond is running. If I type
Code:

crontab -l
the result is:
Code:

20 * * * * service vsftpd start
It means that ftp daemon could start every hours, but this command never execute.
Do you have any idea why this command doesn't execute?

Thanks

hubbruch 04-24-2007 02:34 AM

Quote:

Originally Posted by gubak
Code:

20 * * * * service vsftpd start
It means that ftp daemon could start every hours, but this command never execute.
Do you have any idea why this command doesn't execute?

That will start every 20 minutes after the hour. If you want to run something every Sunday 9AM then try

Code:

0 9 * * sun /path/to/vsftpdscript

Your example won't execute (my guess) because cron wants a full path to whatever it's supposed to run.


All times are GMT -5. The time now is 01:20 PM.