Sponsored Content
Full Discussion: Cron Jobs
Top Forums UNIX for Dummies Questions & Answers Cron Jobs Post 60565 by locustfurnace on Tuesday 18th of January 2005 10:33:21 PM
Old 01-18-2005
Try as su or root
crontab -l root to see roots crontab, which is most likely the backup processes. If, you decide to delete those, you can by issuing;
crontab -d root
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

CRON Jobs

Hi, I am a total newbie to all things Unix. I've worked out I need to set up something that will allow me to automatically backup a DB for me, the DB is for a foum system I run. Now, I've only found out I need to use telnet for this, and worked out hwo to log into telnet today. From here... (4 Replies)
Discussion started by: eludlow
4 Replies

2. UNIX for Advanced & Expert Users

cron jobs

I need to monitor my cron jobs with another unix machine since occasionally the cron will go down on the main server but there are no errors. Can anyone help with a script to write to use the cron on the back up machine to monitor the main server? I am using SCO and the cron jobs have been... (3 Replies)
Discussion started by: rmarral
3 Replies

3. Solaris

Cron Jobs

I'm trying to run cron jobs to start any inhibited processes after a system reboot. I can schedule th cron, but i'm confused as to how to incorporated the reboot, since reboot is scheduled at different times, once every month. How can I write this to start every 15 min after after a reboot ... (2 Replies)
Discussion started by: Remi
2 Replies

4. Solaris

cron jobs

how to Put a cron entry which should be same script triggered on every Saturday and 1st of every month at 01.00 GMT. 0 2 1 * 6 --( At 2.00 GMT every sat & on 1st of every month) the above syntax is correct? Thanks (1 Reply)
Discussion started by: kurva
1 Replies

5. UNIX for Dummies Questions & Answers

cron jobs

Hi, We have a group of hosts using which the cron jobs are submitted... Few days ago i had submitted a cron job in of these hosts, but unfortunately forgot the host name :( Can anyone please help me out in finding this host name from which the cron s submitting the job, i dont want the... (2 Replies)
Discussion started by: bhavanisree
2 Replies

6. Linux

Cron jobs

Hi, I am a Linux administrator (newbie) in my company. The distro being used in the servers here is Centos 5.3 Just need to know, as a Linux administrator is it better for me to use /etc/crontab to set my cron jobs. I do not want to use the crontab -e to schedule my cron jobs. That means... (1 Reply)
Discussion started by: anaigini45
1 Replies

7. Shell Programming and Scripting

Help with cron jobs

Hi Frenz, How do we get a cron job running in background to foreground ? (3 Replies)
Discussion started by: mkalase
3 Replies

8. Shell Programming and Scripting

cron jobs

Hi, please help on this am trying to exec the below mentioned cron jobs but its getting failed fro the past two days ###but when am trying to execte the cron by the times 23,29 18 * * * /export/home/inrvgo/thelak/China.sh its getting exec properly please help on this #... (8 Replies)
Discussion started by: thelakbe
8 Replies

9. Solaris

Cron jobs and at jobs

There are two jobs in Solaris , Cron and at jobs.. I know how to disable or enable cron jobs. How can I enable at jobs and disable it. Kindly help. Rj (2 Replies)
Discussion started by: jegaraman
2 Replies

10. Red Hat

Cron jobs

I'm running cronjobs on a redhat 5.X. Cronjobs are getting failed frequently so how to find the root cause (2 Replies)
Discussion started by: karthik9358
2 Replies
DateTime::Event::Cron(3pm)				User Contributed Perl Documentation				DateTime::Event::Cron(3pm)

NAME
DateTime::Event::Cron - DateTime extension for generating recurrence sets from crontab lines and files. SYNOPSIS
use DateTime::Event::Cron; # check if a date matches (defaults to current time) my $c = DateTime::Event::Cron->new('* 2 * * *'); if ($c->match) { # do stuff } if ($c->match($date)) { # do something else for datetime $date } # DateTime::Set construction from crontab line $crontab = '*/3 15 1-10 3,4,5 */2'; $set = DateTime::Event::Cron->from_cron($crontab); $iter = $set->iterator(after => DateTime->now); while(1) { my $next = $iter->next; my $now = DateTime->now; sleep(($next->subtract_datetime_absolute($now))->seconds); # do stuff... } # List of DateTime::Set objects from crontab file @sets = DateTime::Event::Cron->from_crontab(file => '/etc/crontab'); $now = DateTime->now; print "Now: ", $now->datetime, " "; foreach (@sets) { my $next = $_->next($now); print $next->datetime, " "; } # DateTime::Set parameters $crontab = '* * * * *'; $now = DateTime->now; %set_parms = ( after => $now ); $set = DateTime::Event::Cron->from_cron(cron => $crontab, %set_parms); $dt = $set->next; print "Now: ", $now->datetime, " and next: ", $dt->datetime, " "; # Spans for DateTime::Set $crontab = '* * * * *'; $now = DateTime->now; $now2 = $now->clone; $span = DateTime::Span->from_datetimes( start => $now->add(minutes => 1), end => $now2->add(hours => 1), ); %parms = (cron => $crontab, span => $span); $set = DateTime::Event::Cron->from_cron(%parms); # ...do things with the DateTime::Set # Every RTFCT relative to 12am Jan 1st this year $crontab = '7-10 6,12-15 10-28/2 */3 3,4,5'; $date = DateTime->now->truncate(to => 'year'); $set = DateTime::Event::Cron->from_cron(cron => $crontab, after => $date); # Rather than generating DateTime::Set objects, next/prev # calculations can be made directly: # Every day at 10am, 2pm, and 6pm. Reference date # defaults to DateTime->now. $crontab = '10,14,18 * * * *'; $dtc = DateTime::Event::Cron->new_from_cron(cron => $crontab); $next_datetime = $dtc->next; $last_datetime = $dtc->previous; ... # List of DateTime::Event::Cron objects from # crontab file @dtc = DateTime::Event::Cron->new_from_crontab(file => '/etc/crontab'); # Full cron lines with user, such as from /etc/crontab # or files in /etc/cron.d, are supported and auto-detected: $crontab = '* * * * * gump /bin/date'; $dtc = DateTime::Event::Cron->new(cron => $crontab); # Auto-detection of users is disabled if you explicitly # enable/disable via the user_mode parameter: $dtc = DateTime::Event::Cron->new(cron => $crontab, user_mode => 1); my $user = $dtc->user; my $command = $dtc->command; # Unparsed original cron entry my $original = $dtc->original; DESCRIPTION
DateTime::Event::Cron generated DateTime events or DateTime::Set objects based on crontab-style entries. METHODS
The cron fields are typical crontab-style entries. For more information, see crontab(5) and extensions described in Set::Crontab. The fields can be passed as a single string or as a reference to an array containing each field. Only the first five fields are retained. DateTime::Set Factories See DateTime::Set for methods provided by Set objects, such as "next()" and "previous()". from_cron($cronline) from_cron(cron => $cronline, %parms, %set_parms) Generates a DateTime::Set recurrence for the cron line provided. See new() for details on %parms. Optionally takes parameters for DateTime::Set. from_crontab(file => $crontab_fh, %parms, %set_parms) Returns a list of DateTime::Set recurrences based on lines from a crontab file. $crontab_fh can be either a filename or filehandle reference. See new() for details on %parm. Optionally takes parameters for DateTime::Set which will be passed along to each set for each line. as_set(%set_parms) Generates a DateTime::Set recurrence from an existing DateTime::Event::Cron object. Constructors new_from_cron(cron => $cronstring, %parms) Returns a DateTime::Event::Cron object based on the cron specification. Optional parameters include the boolean 'user_mode' which indicates that the crontab entry includes a username column before the command. new_from_crontab(file => $fh, %parms) Returns a list of DateTime::Event::Cron objects based on the lines of a crontab file. $fh can be either a filename or a filehandle reference. Optional parameters include the boolean 'user_mode' as mentioned above. Other methods next() next($date) Returns the next valid datetime according to the cron specification. $date defaults to DateTime->now unless provided. previous() previous($date) Returns the previous valid datetime according to the cron specification. $date defaults to DateTime->now unless provided. increment($date) decrement($date) Same as "next()" and "previous()" except that the provided datetime is modified to the new datetime. match($date) Returns whether or not the given datetime (defaults to current time) matches the current cron specification. Dates are truncated to minute resolution. valid($date) A more strict version of match(). Returns whether the given datetime is valid under the current cron specification. Cron dates are only accurate to the minute -- datetimes with seconds greater than 0 are invalid by default. (note: never fear, all methods accepting dates will accept invalid dates -- they will simply be rounded to the next nearest valid date in all cases except this particular method) command() Returns the command string, if any, from the original crontab entry. Currently no expansion is performed such as resolving environment variables, etc. user() Returns the username under which this cron command was to be executed, assuming such a field was present in the original cron entry. original() Returns the original, unparsed cron string including any user or command fields. AUTHOR
Matthew P. Sisk <sisk@mojotoad.com> COPYRIGHT
Copyright (c) 2003 Matthew P. Sisk. All rights reserved. All wrongs revenged. This program is free software; you can distribute it and/or modify it under the same terms as Perl itself. SEE ALSO
DateTime(3), DateTime::Set(3), DateTime::Event::Recurrence(3), DateTime::Event::ICal(3), DateTime::Span(3), Set::Crontab(3), crontab(5) perl v5.14.2 2010-06-10 DateTime::Event::Cron(3pm)
All times are GMT -4. The time now is 06:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy