LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Scheduled task in linux? (https://www.linuxquestions.org/questions/linux-newbie-8/scheduled-task-in-linux-129815/)

Dakkar 12-29-2003 12:30 PM

Scheduled task in linux?
 
I wonder does linux have a scheduled task manager i want to cut a file and paste it into somewhere in periodic times.How can i do this is this possible?

mac_phil 12-29-2003 12:46 PM

man crond

Gates1026 12-29-2003 12:49 PM

There is a system utility called the cron that checks for jobs whenever you specify it to and performs your tasks that you give it. The way I use the cron is by setting up a side directory somewhere called cron or something like that. After that I make a file called cronjobs with an editor such as vi. The syntax looks like the following:
Minute, Hour, Day of Month, Month, Day of week (* means every possible time of that field)

a cron file could look like this (This would do a job every day at 1:30 PM)

30 13 * * * /home/myname/cron/myscript

then do # crontab cronjobs and the script myscript will be executed every day at 1:30 PM.

I hope I didnt confuse you more, there is plenty of documentation if I did :) Hope this helps!

Dakkar 12-30-2003 08:10 AM

is it possible to send a file by ftp with crontab
if it is how can i do it?

Demonbane 12-30-2003 08:54 AM

Yea of course, its just a matter of using a non-interactive ftp client
Try lftp, it can be used both interactive or non-interactively, and it probably comes with your distro, you'd invoke something like this:
Code:

lftp -e 'put myfile && exit' -u myusername,mypasswd ftp.myftpserver.com
also when you want to schedule something to execute only once then try "at", its very simple to use(but you need atd running), check out the man page.


All times are GMT -5. The time now is 02:51 AM.