I'm not advocating for major changes to cron. Simply asking if this
had been made available where I knew it wasn't there in the past.
I'll go look at what some of the Linux scripts are doing. Maybe I can
quickly port that over to AIX while being a little less "hacky". ;]
On Mon, Jun 13, 2022 at 07:44:52AM +0000, Esa K?rkk?inen via IBM Community wrote:
> Hi,
>
> IMHO the short answer is no, not without replacing or at least partially rewriting the cron daemon that is used in AIX.
> IIRC the cron daemon used by AIX orginates from System V, because its history does not have any idea of these "newfagled" thingamabogs like "@daily", "@weekly", "@monthly", "@yearly" or "@reboot" crontab shortcuts etc introduced in newer non SystemV cron daemons.
>
> AFAIK you and others in the community can ask IBM to replace cron daemon used in AIX, using "request for proposals" RFP process.
>
> FWIW your "hacky" solution is perfectly fine, I'd add "test -x" and "echo $?" into the loop.
>
> Br, Esa
>
> ------------------------------
> Esa K?rkk?inen
> ------------------------------
> -------------------------------------------
> Original Message:
> Sent: Sat June 11, 2022 05:18 AM
> From: Russell Adams
> Subject: Something like cron.daily or /etc/cron.d/ for AIX?
>
> Tom,
>
> Many Linux distros (and FreeBSD!) place crontabs from packages into
> directories like /etc/cron.d/daily.
>
>
https://unix.stackexchange.com/questions/458713/how-are-files-under-etc-cron-d-used <https: unix.stackexchange.com/questions/458713/how-are-files-under-etc-cron-d-used="">
>
> If you had a backup software package, it might create a file
> /etc/cron.d/daily/backups.cron instead of trying to reliably add or
> remove lines of text to root's crontab.
>
> It's really a packaging technique. In the world of configuration
> management it's *really* hard to reliably patch a text file with
> dynamic contents like crontab, versus dropping in a unique file.
>
> You can do something similar with a root crontab entry like:
>
> 0 0 * * * /path/to/my/daily.sh
>
> Where daily.sh just does:
>
> for X in /etc/cron.daily/* ; do $X ; done
>
> That's really hacky, but same concept.
>
> On Sat, Jun 11, 2022 at 09:07:30AM +0000, Tom McGivern via IBM Community wrote:
> > Individual files?Can you elaborate ?
> >
> > -------------------------------------------
> > Original Message:
> > Sent: 6/10/2022 7:15:00 PM
> > From: Russell Adams
> > Subject: Something like cron.daily or /etc/cron.d/ for AIX?
> >
> > Anyone seen a method to have individual cron jobs in single files on AIX?
> >
> > I can always fall back on a daily script which runs everything from one location.
> >
> > ------------------------------
> > ========================
> > Russell Adams
> >
https://adamssystems.nl/ <https: adamssystems.nl/="">
> > ========================
> > ------------------------------
> >
> >
> > Reply to Sender :
https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=258458&SenderKey=4f5c88a2-c315-465e-9098-ff14f4c25de8 <https: community.ibm.com/community/user/egroups/postreply?groupid="6049&MID=258458&SenderKey=4f5c88a2-c315-465e-9098-ff14f4c25de8">
> >
> > Reply to Discussion :
https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=258458 <https: community.ibm.com/community/user/egroups/postreply?groupid="6049&MID=258458">
> >
> >
> >
> > You are subscribed to "AIX" as
Russell.Adams@AdamsSystems.nl <
russell.adams@adamssystems.nl>. To change your subscriptions, go to
http://community.ibm.com/community/user/preferences?section=Subscriptions. <http: community.ibm.com/community/user/preferences?section="Subscriptions."> To unsubscribe from this community discussion, go to
http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=c23dfccc-9910-40ae-beeb-fdcbced5bf1f&sKey=KeyRemoved&GroupKey=7b554d78-d4dc-417a-b4dc-017e309e5c91. <http: community.ibm.com/higherlogic/egroups/unsubscribe.aspx?userkey="c23dfccc-9910-40ae-beeb-fdcbced5bf1f&sKey=KeyRemoved&GroupKey=7b554d78-d4dc-417a-b4dc-017e309e5c91.">
>
>
> ------------------------------------------------------------------
> Russell Adams
Russell.Adams@AdamsSystems.nl <
russell.adams@adamssystems.nl>
> Principal Consultant Adams Systems Consultancy
>
https://adamssystems.nl/ <https: adamssystems.nl/="">
>
>
> Original Message:
> Sent: 6/11/2022 5:07:00 AM
> From: Tom McGivern
> Subject: RE: Something like cron.daily or /etc/cron.d/ for AIX?
>
> Individual files?Can you elaborate ?
>
>
> Original Message:
> Sent: 6/10/2022 7:15:00 PM
> From: Russell Adams
> Subject: Something like cron.daily or /etc/cron.d/ for AIX?
>
> Anyone seen a method to have individual cron jobs in single files on AIX?
>
> I can always fall back on a daily script which runs everything from one location.
>
> ------------------------------
> ========================
> Russell Adams
>
https://adamssystems.nl/ <https: adamssystems.nl/="">
> ========================
> ------------------------------
>
>
> Reply to Sender :
https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=258494&SenderKey=1b9bfa5e-cdcf-46be-a273-1d2a4e10703b>
> Reply to Discussion :
https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=258494>
>
>
> You are subscribed to "AIX" as
Russell.Adams@AdamsSystems.nl. To change your subscriptions, go to
http://community.ibm.com/community/user/preferences?section=Subscriptions. To unsubscribe from this community discussion, go to
http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=c23dfccc-9910-40ae-beeb-fdcbced5bf1f&sKey=KeyRemoved&GroupKey=7b554d78-d4dc-417a-b4dc-017e309e5c91.------------------------------------------------------------------
Russell Adams
Russell.Adams@AdamsSystems.nlPrincipal Consultant Adams Systems Consultancy
https://adamssystems.nl/
Original Message:
Sent: 6/13/2022 3:45:00 AM
From: Esa Kärkkäinen
Subject: RE: Something like cron.daily or /etc/cron.d/ for AIX?
Hi,
IMHO the short answer is no, not without replacing or at least partially rewriting the cron daemon that is used in AIX.
IIRC the cron daemon used by AIX orginates from System V, because its history does not have any idea of these "newfagled" thingamabogs like "@daily", "@weekly", "@monthly", "@yearly" or "@reboot" crontab shortcuts etc introduced in newer non SystemV cron daemons.
AFAIK you and others in the community can ask IBM to replace cron daemon used in AIX, using "request for proposals" RFP process.
FWIW your "hacky" solution is perfectly fine, I'd add "test -x" and "echo $?" into the loop.
Br, Esa
------------------------------
Esa Kärkkäinen
------------------------------
Original Message:
Sent: Sat June 11, 2022 05:18 AM
From: Russell Adams
Subject: Something like cron.daily or /etc/cron.d/ for AIX?
Tom,
Many Linux distros (and FreeBSD!) place crontabs from packages into
directories like /etc/cron.d/daily.
https://unix.stackexchange.com/questions/458713/how-are-files-under-etc-cron-d-used
If you had a backup software package, it might create a file
/etc/cron.d/daily/backups.cron instead of trying to reliably add or
remove lines of text to root's crontab.
It's really a packaging technique. In the world of configuration
management it's *really* hard to reliably patch a text file with
dynamic contents like crontab, versus dropping in a unique file.
You can do something similar with a root crontab entry like:
0 0 * * * /path/to/my/daily.sh
Where daily.sh just does:
for X in /etc/cron.daily/* ; do $X ; done
That's really hacky, but same concept.
On Sat, Jun 11, 2022 at 09:07:30AM +0000, Tom McGivern via IBM Community wrote:
> Individual files?Can you elaborate ?
>
> -------------------------------------------
> Original Message:
> Sent: 6/10/2022 7:15:00 PM
> From: Russell Adams
> Subject: Something like cron.daily or /etc/cron.d/ for AIX?
>
> Anyone seen a method to have individual cron jobs in single files on AIX?
>
> I can always fall back on a daily script which runs everything from one location.
>
> ------------------------------
> ========================
> Russell Adams
> https://adamssystems.nl/
> ========================
> ------------------------------
>
>
> Reply to Sender : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=258458&SenderKey=4f5c88a2-c315-465e-9098-ff14f4c25de8
>
> Reply to Discussion : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=258458
>
>
>
> You are subscribed to "AIX" as Russell.Adams@AdamsSystems.nl. To change your subscriptions, go to http://community.ibm.com/community/user/preferences?section=Subscriptions. To unsubscribe from this community discussion, go to http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=c23dfccc-9910-40ae-beeb-fdcbced5bf1f&sKey=KeyRemoved&GroupKey=7b554d78-d4dc-417a-b4dc-017e309e5c91.
------------------------------------------------------------------
Russell Adams Russell.Adams@AdamsSystems.nl
Principal Consultant Adams Systems Consultancy
https://adamssystems.nl/
Original Message:
Sent: 6/11/2022 5:07:00 AM
From: Tom McGivern
Subject: RE: Something like cron.daily or /etc/cron.d/ for AIX?
Individual files?
Can you elaborate ?
Original Message:
Sent: 6/10/2022 7:15:00 PM
From: Russell Adams
Subject: Something like cron.daily or /etc/cron.d/ for AIX?
Anyone seen a method to have individual cron jobs in single files on AIX?
I can always fall back on a daily script which runs everything from one location.
------------------------------
========================
Russell Adams
https://adamssystems.nl/
========================
------------------------------
</https:></https:></russell.adams@adamssystems.nl></http:></http:></russell.adams@adamssystems.nl></https:></https:></https:></https:>