Monitoring of cron jobs in crontab using shell script
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Could someone help in writing a shell script to monitor different cron jobs in crontab. As everyone knows different cron jobs run at different time I want to capture following things in ".csv" format:
- Script Name
- Scheduled times
- Next scheduled time
- Last Run time.
- Did the script ended successfully or it had an error after executing (Success/Fail).
I have certain limitations:
syslog
is not printing all the debug logs.- Can't edit crontab.
I have logs which are directed which could be used.
shell-script cron logs
add a comment |Â
up vote
0
down vote
favorite
Could someone help in writing a shell script to monitor different cron jobs in crontab. As everyone knows different cron jobs run at different time I want to capture following things in ".csv" format:
- Script Name
- Scheduled times
- Next scheduled time
- Last Run time.
- Did the script ended successfully or it had an error after executing (Success/Fail).
I have certain limitations:
syslog
is not printing all the debug logs.- Can't edit crontab.
I have logs which are directed which could be used.
shell-script cron logs
1
Unless you have root access this is next to impossible because the necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively).
â roaima
Mar 31 at 13:41
logs cannot be used???
â Vivek
Mar 31 at 15:50
cron scheduling syntax is pretty hairy. what's the difference between 2,3,4
â Jasen
Apr 1 at 8:50
if Vixie cron use-L15
on the command-line
â Jasen
Apr 1 at 8:52
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Could someone help in writing a shell script to monitor different cron jobs in crontab. As everyone knows different cron jobs run at different time I want to capture following things in ".csv" format:
- Script Name
- Scheduled times
- Next scheduled time
- Last Run time.
- Did the script ended successfully or it had an error after executing (Success/Fail).
I have certain limitations:
syslog
is not printing all the debug logs.- Can't edit crontab.
I have logs which are directed which could be used.
shell-script cron logs
Could someone help in writing a shell script to monitor different cron jobs in crontab. As everyone knows different cron jobs run at different time I want to capture following things in ".csv" format:
- Script Name
- Scheduled times
- Next scheduled time
- Last Run time.
- Did the script ended successfully or it had an error after executing (Success/Fail).
I have certain limitations:
syslog
is not printing all the debug logs.- Can't edit crontab.
I have logs which are directed which could be used.
shell-script cron logs
edited Mar 31 at 13:18
Yurij Goncharuk
2,2582521
2,2582521
asked Mar 31 at 12:23
Vivek
11
11
1
Unless you have root access this is next to impossible because the necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively).
â roaima
Mar 31 at 13:41
logs cannot be used???
â Vivek
Mar 31 at 15:50
cron scheduling syntax is pretty hairy. what's the difference between 2,3,4
â Jasen
Apr 1 at 8:50
if Vixie cron use-L15
on the command-line
â Jasen
Apr 1 at 8:52
add a comment |Â
1
Unless you have root access this is next to impossible because the necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively).
â roaima
Mar 31 at 13:41
logs cannot be used???
â Vivek
Mar 31 at 15:50
cron scheduling syntax is pretty hairy. what's the difference between 2,3,4
â Jasen
Apr 1 at 8:50
if Vixie cron use-L15
on the command-line
â Jasen
Apr 1 at 8:52
1
1
Unless you have root access this is next to impossible because the necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively).
â roaima
Mar 31 at 13:41
Unless you have root access this is next to impossible because the necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively).
â roaima
Mar 31 at 13:41
logs cannot be used???
â Vivek
Mar 31 at 15:50
logs cannot be used???
â Vivek
Mar 31 at 15:50
cron scheduling syntax is pretty hairy. what's the difference between 2,3,4
â Jasen
Apr 1 at 8:50
cron scheduling syntax is pretty hairy. what's the difference between 2,3,4
â Jasen
Apr 1 at 8:50
if Vixie cron use
-L15
on the command-lineâ Jasen
Apr 1 at 8:52
if Vixie cron use
-L15
on the command-lineâ Jasen
Apr 1 at 8:52
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Given the criteria you have specified this is not possible.
The necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively) or change the flags used to run from, or read the cron log files.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Given the criteria you have specified this is not possible.
The necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively) or change the flags used to run from, or read the cron log files.
add a comment |Â
up vote
0
down vote
Given the criteria you have specified this is not possible.
The necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively) or change the flags used to run from, or read the cron log files.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Given the criteria you have specified this is not possible.
The necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively) or change the flags used to run from, or read the cron log files.
Given the criteria you have specified this is not possible.
The necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively) or change the flags used to run from, or read the cron log files.
answered Apr 1 at 10:15
roaima
39.5k545106
39.5k545106
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f434662%2fmonitoring-of-cron-jobs-in-crontab-using-shell-script%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Unless you have root access this is next to impossible because the necessary information is not available to non- root users. If you do have root you can edit crontab (technically, if not administratively).
â roaima
Mar 31 at 13:41
logs cannot be used???
â Vivek
Mar 31 at 15:50
cron scheduling syntax is pretty hairy. what's the difference between 2,3,4
â Jasen
Apr 1 at 8:50
if Vixie cron use
-L15
on the command-lineâ Jasen
Apr 1 at 8:52