OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Utilities => Topic started by: Mike Snyder on August 14, 2020, 04:47:28 pm

Title: Is there a cron application that works on ArcaOS?
Post by: Mike Snyder on August 14, 2020, 04:47:28 pm
For years I used a unix port called cron/2 to perform various backup and other tasks.  At some time between ArcaOS 5 and 5.04, it stopped working.  By that I mean that while the program runs, it will not start any applicatiions.  I've also tried a cron application written in REXX, but it won't start anything for me either.  Does anyone know of one that works on the current version of ArcaOS?
Title: Re: Is there a cron application that works on ArcaOS?
Post by: Dariusz Piatkowski on August 14, 2020, 05:00:10 pm
Hey Michael,

Ugh?

I am using CRON/2 today, albeit not with AOS...nevertheless, I am curious, what are the errors you are seeing?

-Dariusz
Title: Re: Is there a cron application that works on ArcaOS?
Post by: Dave Yeo on August 14, 2020, 05:16:34 pm
Hi Michael, the simplest is to create a program object for the program you want to run then set it to run when you want in the Properties under the Schedule tab.
Title: Re: Is there a cron application that works on ArcaOS?
Post by: Mike Snyder on August 14, 2020, 10:51:03 pm
Dave,

I don't seem to have a schedule tab on any of my properties notebooks.  How did you get them?
Title: Re: Is there a cron application that works on ArcaOS?
Post by: Mike Snyder on August 14, 2020, 10:53:56 pm
Dariusz,

I don't get any error messages.  If I launch cron/2, it just sets there.  It does not start any of the programs listed in the cron2.dat file.  They're mostly rar commands to do backups.  I get no backup and no error messages.
Title: Re: Is there a cron application that works on ArcaOS?
Post by: David Graser on August 14, 2020, 10:58:41 pm
Dave,

I don't seem to have a schedule tab on any of my properties notebooks.  How did you get them?

If you are using ArcaOS, it is there.

Right click on a program object.  At the top of the properties tabs, one of the tabs should be labed "Schedule".

Attached is a picture.
Title: Re: Is there a cron application that works on ArcaOS?
Post by: Dave Yeo on August 15, 2020, 01:00:10 am
As David said, it has to be a program object. If it is a script, the program object has to be for cmd.exe with the parameters /c x:\path\to\script.cmd or such and likely the working directory set correctly too.
Title: Re: Is there a cron application that works on ArcaOS?
Post by: Remy on August 15, 2020, 01:20:14 am
For years I used a unix port called cron/2 to perform various backup and other tasks.  At some time between ArcaOS 5 and 5.04, it stopped working.  By that I mean that while the program runs, it will not start any applicatiions.  I've also tried a cron application written in REXX, but it won't start anything for me either.  Does anyone know of one that works on the current version of ArcaOS?

You can create a cron like with rexx.
Just write a daemon (started under startup folder)) which uses defined rules for applications, at the date/time specified into the rules, the process start
(So i'm currently do with the exception that rules are set through a GUI under ClamAV scheduler)

To show what could be done with basic rules (this one was recently alpha build updated _ a few tests were ok for me)
It was specifically build for use with ClamAV-GUI (uses same ini file) but it could be upgraded to a more general use. 
 
Title: Re: Is there a cron application that works on ArcaOS?
Post by: Mike Snyder on August 15, 2020, 05:19:17 am
I'm trying program objects.  Thanks to all for the help.
Title: Re: Is there a cron application that works on ArcaOS?
Post by: Dariusz Piatkowski on August 15, 2020, 03:18:19 pm
Hi Michael,

Dariusz,

I don't get any error messages.  If I launch cron/2, it just sets there.  It does not start any of the programs listed in the cron2.dat file.  They're mostly rar commands to do backups.  I get no backup and no error messages.

Ahh, OK, got it. I have to say the cron/2 documentation is hard to understand (for me it was anyways) in that the cron2.dat file structure just didn't seem to make sense. Most likely that's b/c it does not seem to follow the Unix cron configuration, so any on-line references you find out there just don't seem to readily translate to the cron/2 port.

Having said that, here are a couple of examples that I was toying with:

1) do a continuous refresh of a NAS folder
0-59/5,0-23,1-31,1-12,0-7 * * * * OS2 BG FULL- g:\util\misc\refresh_folder.cmd V:\public\syslog

2) do a MONTHLY refresh of a NAS folder
* * 1 * * OS2 BG FULL- g:\util\misc\folder_refresh.cmd V:\public\syslog

3) Force the EVERY_5_MINUTES folder refresh for: V:\public\syslog
0,5,10,15,20,25,30,35,50,45,50,55 * * * * OS2 BG FULL- g:\util\misc\folder_refresh.cmd V:\public\syslog

Of the above three just the 3rd one worked, the first two I just couldn't make work, and those were defined using the Unix documentation which cron/2 claims to support.

Anyways, if you are still looking to use cron/2 I would say give that a try.
Title: Re: Is there a cron application that works on ArcaOS?
Post by: Neil Waldhauer on August 16, 2020, 08:35:50 pm
Another suggestion for a chron-like utility

https://hobbes.nmsu.edu/?dir=%2F&stype=all&sort=type_name&search=atrgf (https://hobbes.nmsu.edu/?dir=%2F&stype=all&sort=type_name&search=atrgf)

I used this on some eCS and ArcaOS systems. But it is trying to be AT rather than chron.
Title: Re: Is there a cron application that works on ArcaOS?
Post by: Mike Snyder on August 29, 2020, 05:43:30 pm
Thanks to all for your suggestions.  The program objects schedule page works well for me now.  Don't know how I missed that it existed, but after reading the help, it is just as easy as cron.