Link to home
Start Free TrialLog in
Avatar of hojohappy
hojohappy

asked on

CRON Questins

Trying to understand CRON and how to use.  Running CRON on a JBOSS server.

 1. Are there different versions of CRON?  One for Windows and one for LINUX?
 2. What type of information can be logged when CRON job executes?  
 3. Is it possible to configure the log to capture job details on what specific Database tables or fields were updated?
 4. Are there any free software products that can complicate CRON?  Like maybe provide better logging information on a CRON job?
 5.  Any suggestions or things I should look at for hen using CRON?
Avatar of noci
noci

cron just takes a schedule de scription (what to do when).
it runs a command (which can also be a script)
any output will cause a mail (containing the output) to be sent to the  user for which cron runs that command.
(you can use the >filename on the command line to send all output to a file)...
 
The various cron's all work along the same line, some have special features for some special cases.
i am not aware how windows cron works so can't comment on that.
Maybe you are looking for the QUARTZ scheduler?
Avatar of hojohappy

ASKER

Yes but what is the difference between Quartz and CRON?  I know Quartz can run a CRON expression so doe that mean you do not need a CRON batch file or can you have Quartz just a call an expression listed in a CRON file
ASKER CERTIFIED SOLUTION
Avatar of Surrano
Surrano
Flag of Hungary image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, this is really great but can you explain "second-granularity"?   Also, so if the CRON level of granularity is needed then both can exists.  In this case, Quartz would reference a CRON file or can JBoss execute a CRON file without Quartz?  If you answer this you can have the points from two of my other CRON questions that I posted.  (1500 total points)
Second vs minute granularity means that
- In JBoss Quartz cron job, you can specify a cron job to run like 5:00:15 every Monday, i.e. 15 seconds after 5AM.
- In Unix cron, you can only specify like 5:00 or 5:01, but nothing in-between.

The two are independent. If you have a unix cron job, it is triggered regardless of JBoss state.
If you have a JBoss cron job, it's completely configured and executed within JBoss, but of course only if JBoss is running at the moment it needs to be triggered. What you usually trigger is a Java class file's run() method (not sure about the method name though).
BTW Please don't award me points I haven't earned. If you tell me the reference links to those questions, I'll try to answer them of course.
If you're looking for a simpler cron job solution, you might consider webcron services which will load a specific URL at a given time.
For example, https://www.easycron.com