How do I format these two complex cron statements?


cbrunny
25/12/2015 9:47 am
HOME ยป Unix

I need two very specific cron statements:

  1. A cron entry that would run on the 2nd Monday of each month every 4 hours beginning at 02:00 and execute the file /opt/bin/cleanup.sh

  2. A cron entry that would run at 18:15 on the 3rd day of every month ending in an "r" that executes /opt/bin/verrrrrrrry.sh

I've already tried various cron testers:

cron checker,cron tester,and cron translator

however none of them seem to be able to handle advanced cron expressions(or I do not know how to format the correct expression) as stated on

the cron trigger tutorial and wikipedia

How can I check my cron statements? I obviously cannot wait for the actual event to pass so that the daemon may execute them.

Is there a good cron tester which supports advanced expressions? Or how to make the cron daemon parse the expression, or how to code these expressions?

What I have so far for these statements is:

  1. 0 2 * * 0#2 /opt/bin/cleanup.sh
  2. 15 18 3 * * /opt/bin/verrrrrrrry.sh

But of course these are not correct.

For #1, I do not know how to specify the '2nd Monday', nor 'every 4 hours', while still beginning at 02:00.

For #2, I have no idea how to only specify months ending in an 'r' except by manually coding them in. Nor do I know how to specify the 3rd day.


Related to : How do I format these two complex cron statements?
How do I format these two complex cron statements?
25/12/2015 9:47 am by cbrunny in Unix

I need two very specific cron statements:

  1. A cron entry that would run on the 2nd Monday of each month every 4 hours beginning at 02:00 and execute the file /opt/bin/cleanup.sh

  2. A cron entry that would run at 18:15 on the 3rd day of every month ending in an "r" that


Need examples of complex fortran format statements?
by negonicrac in Unix

I'm trying to write a data parser in C# to use when translating fortran programs to .NET. The thing works by taking a file, the fortran format string and an array of variables to populate with the results of the file.


I am looking for some examples of real and complex fortran format s


Cron jobs and if statements.
by cyclohexane in Unix
Hello there.
I'm actually having a problem with the logic behind this, I just can't seem to understand how I'm going to make it happen. What I need is...
I run a script every 24 hours that changes a user, right? Let's say every 24 hours I give them 1+ reputation for staying. Okay, but now
Complex timed cron jobs
by Simon Capewell in Unix
Is there any way to set up complex timed cron jobs - ie
I have a job that needs to run at
08:45
12:00
17:15
and 17:35
Without setting up individual cron jobs for each time?
need help with complex if statements
by arbeitandy in Unix
Ok, this is frustrating me. Im making a form and am validating it with if statements. Most of them are simple if( $this == that), but one complex one isnt coming out right. please help.
The code:
PHP Code:
Complex while statements
by IHateMyJob2004 in Unix
Quote:// Listing 7.3
// Complex while statements
#include <iostream>
int main()
{
using namespace std;
unsigned short small;
unsigned long large;
const unsigned short MAXSMALL = 65535;
cout << "Enter a small number: ";
cin &
Complex for-statements
by cpacini in Unix
I have got this four for-statements in a program of mine:
Code:
for (int i = a + 1, j = b + 1; i < 8 || j < 8; i++, j++)
{
        field[i][j] = -1;
  &n
Complex If statements
by Engr62 in Unix
WebFocus
I need to an If statement that can consider all the following:
If the employee is a supervisor and the org code begins with
Complex If Statements + Problems.
by joth in Unix
I realize this is a monster of an if() condition, but I cant think of any better way to do it. Basically, Im checking for all possibilites in the data the user sends which then sorts out data from a database. There are three input types which can be on or off and in any combination. However, when
a complex using IF statements function???
by scsscs in Unix
a complex using IF statements function???
 
Hello everybody:
News on my life: I have another baby -10 days born- :)
I have tried to make a function using IF statements but I have a problem:
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2014 © bighow.org All Rights Reserved .