Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



Cron jobs from a terminal

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 11-12-2009
Member
 
Join Date: Nov 2009
Posts: 520
Cron jobs from a terminal

Hello everyone
I want to create cron jobs from a terminal only space here is what I would do.
Identify each task by a single file of ways to edit, remove easily. I have searched, looked at the manual. I hear good file but not how to create / edit. I also thought and think this is how I do (I prefer to wait for a notice before testing) Create a file "/ var / spool / cron"Appointed"cron_ * id *. cron" with this content. Then execute the command "crontab / var / spool / cron / cron_ * id *. cron. Thanks in advance.
Reply With Quote
  #2  
Old 11-12-2009
Eric B's Avatar
Member
 
Join Date: Apr 2008
Posts: 4,645
Re: Cron jobs from a terminal

Hi,
In my opinion it should take to reverse your problem. This can give something like this:
Code:
0 0 1 * * my_command
The file my_command might be this:
Code:
/ bin / bash
cmd-1
cmd-2
...
The file must be executable my_command course. This file is easily editable via a text editor to add / remove command. I believe that this approach solves your problem and is cleaner than what you initially planned. Each line of the file my_command may be the name of a script of course.

Last edited by Eric B : 11-12-2009 at 03:00 PM.
Reply With Quote
  #3  
Old 11-12-2009
Member
 
Join Date: Nov 2009
Posts: 520
Re: Cron jobs from a terminal

Hi
Indeed I understand this system. The base was to administer the tasks from an administration interface. But I think I'm going to use this file to add / delete / edit tasks by doing this: (in php / shell)
Quote:
- Listing of crontab (shell)
- Viewing and Editing (php)
- Update / Add / Supprission (shell)
I just wanted to create a file but a unique name for each task in a very specific file easily manage (delete, add and delete / add to change) these tasks but it will have "push" a little system.
If anyone knows a simpler method, please do post.
Reply With Quote
  #4  
Old 11-12-2009
Eric B's Avatar
Member
 
Join Date: Apr 2008
Posts: 4,645
Re: Cron jobs from a terminal

Hi,
Nothing prevents you to do it like that. you can retrieve all file names and concatenate them into a file (executable of course). This file is the only existing line in your crontab. So once your set up spot in crontab not need to touch it. Updated fairly easy with a simple shell script. Hope this may help you.
Reply With Quote
Reply

  TechArena Community > Software > Windows Software


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Cron jobs from a terminal"
Thread Thread Starter Forum Replies Last Post
bank jobs Career in banking- Indian overseas bank 1000 jobs March 2011 abhisharma59 Education Career and Job Discussions 1 11-03-2011 05:33 PM
Combining SSH and Cron void Software Development 3 06-08-2010 02:44 AM
Problem in using cron command Gunner 1 Windows Software 5 19-02-2010 01:25 AM
How to setup Cron Job via ssh Nalini_sh Operating Systems 3 12-11-2009 10:16 AM
Cron no output !! Jabeen Software Development 3 13-07-2009 10:05 AM


All times are GMT +5.5. The time now is 09:23 PM.