<@U06V253M4> from the CFConfig docs "Scheduled tas...
# box-products
p
@bdw429s from the CFConfig docs "Scheduled tasks are currently only supported for Adobe ColdFusion. Please contact us if you'd like to sponsor this feature." Ah, consider yourself contacted. I'd love to see how we can get Lucee supported.
ā¤ļø 1
b
@Peter Amiri Excellent! Do you have an existing business relationship with Ortus? if not, we can get @jreyben involved to do so. I'd need to come up with an estimate of how much work it will take and then Jorge can help out with how we bill that.
p
Ya we do, we also have some hours in the bank we can put towards this.
ā¤ļø 1
b
Perfect. Let me take a look to refresh my memory on how Lucee stores the scheduled tasks and whether we can overlap the functionality with Adobe or not.
For example, most every setting supported by both engines uses the same config, but event gateways were an example where the two vendors had such different implementations, CFConfig stores adobe EGs and Lucee EGs separetely and doesn't try to find any common ground.
p
Sounds good, the one thing I've noticed is that on Lucee the scheduled tasks are at the web server context and not at the server context. Don't know if that would cause any issues.
b
That is correct
It doesn't "cause any issues" per se, but it does make it a little more annoying, lol
p
😁
b
I do have support in CFConfig to choose which context your settings go into because logger settings are also used primarily in the web context
p
sounds good, take a look and see what you think it will take to achieve this and lets do it
🤘 1
b
@Peter Amiri It will take 8 hours to add support for Lucee scheduled tasks into CFConfig.
p
@bdw429s Sounds good. Let's get @jreyben to send over an invoice.
b
@Peter Amiri Sweet, it's done and ready for you to test šŸ™‚
Just update to the latest version of CFConfig
THere is a lot of overlap with Adobe's scheduled tasks so it uses the same JSON struct and can even import most data between engines
The
Copy code
cfconfig task list
cfconfig task save
cfconfig task delete
also work
The one trick is that scheduled tasks go in the web context. If you run any of the
cfconfig task
commands above, they will default to the
luceeWeb
format.
But if you're doing a JSON import, you'd need to manually import it into the web context
Copy code
cfconfig import from=settings.json toFormat=luceeweb
Or you can use any of the file-name conventions such as having a
Copy code
.cfconfig-web.json
file that will auto import into the web context
There's a lot of ways to do it šŸ™‚
You can also use the
--pauseTasks
flag to
cfconfig import
or the equivalent
cfconfig.pauseTasks
key in the
server.json
if you want to import the tasks as paused when setting up a server.
p
@bdw429s Sorry for the delay, I am drying a blank on how to point CFConfig to the web context. I started a commandbox lucee server, went into the Web Admin and created a scheduled task, then in CommandBox I issued
cfconfig show fromFormat=luceeWeb
but I don't see the specific task in the json output.
b
That should do it
Are you in the right directory?
Also, try
Copy code
cfconfig task list
And you installed the latest CFConfig too, right?
Copy code
update --system
p
ya, made sure I stop the server and can't get to the gui so I know I'm in the right one
I did a
install
let me do an update
b
Did you also test
Copy code
cfconfig task list
?
p
āÆ cfconfig task list No scheduled tasks defined.
āÆ cfconfig show fromFormat=luceeWeb { "adminSalt":"773ED510-8029-40D9-A280F5F0298CF98F", "componentPaths":{ "xampleComponentPath":{ "inspectTemplate":"Never", "name":"xampleComponentPath", "physical":"/some/Component/Path", "primary":"Resource" } }, "hspw":"0e2f0d33e5f0f0a7fb3f957b84668d83f9f69516be96aca5f5867c8d268be96c", "loggers":{ "application":{ "appender":"resource", "appenderArguments":{ "path":"{lucee-config}/logs/application.log" }, "layout":"classic", "level":"info" }, "exception":{ "appender":"resource", "appenderArguments":{ "path":"{lucee-config}/logs/exception.log" }, "layout":"classic", "level":"info" }, "mail":{ "appender":"resource", "appenderArguments":{ "path":"{lucee-config}/logs/mail.log" }, "layout":"classic" }, "remoteclient":{ "appender":"resource", "appenderArguments":{ "path":"{lucee-config}/logs/remoteclient.log" }, "layout":"classic", "level":"info" }, "requesttimeout":{ "appender":"resource", "appenderArguments":{ "path":"{lucee-config}/logs/requesttimeout.log" }, "layout":"classic" }, "scheduler":{ "appender":"resource", "appenderArguments":{ "path":"{lucee-config}/logs/scheduler.log" }, "layout":"classic" }, "trace":{ "appender":"resource", "appenderArguments":{ "path":"{lucee-config}/logs/trace.log" }, "layout":"classic" } } }
b
Can you report the CFConfig versions in
Copy code
list --system
p
āÆ list --system Dependency Hierarchy for CommandBox System (1.0.0) ā”œā”€ā”¬ gitbook-exporter (1.1.13) │ ā”œā”€ā”€ jython-standalone-2.7.1 (2.7.1) │ ā”œā”€ā”€ image4j-0.7 (0.0.0) │ └── pygments-2.4.2 (2.4.2) ā”œā”€ā”¬ commandbox-cfformat (0.17.5) │ └── testbox () ā”œā”€ā”¬ commandbox-cfconfig (1.10.0) │ └─┬ cfconfig-services (1.18.2) │ ā”œā”€ā”€ lucee-password-util (1.0.3) │ ā”œā”€ā”€ coldbox () │ ā”œā”€ā”€ testbox () │ ā”œā”€ā”¬ JSONPrettyPrint (1.4.1) │ │ ā”œā”€ā”€ coldbox () │ │ └── testbox () │ ā”œā”€ā”¬ adobe-password-util (1.0.8) │ │ └── propertyFile (1.3.2) │ ā”œā”€ā”¬ semver (1.2.6) │ │ └── testbox () │ └── propertyFile (1.3.2) ā”œā”€ā”€ cfwheels-cli (1.1.0) ā”œā”€ā”¬ commandbox-semver (1.1.1) │ └─┬ semver (1.2.6) │ └── testbox () ā”œā”€ā”€ commandbox-fusionreactor (4.2.2) ā”œā”€ā”¬ commandbox-dotenv (2.3.0) │ └── propertyFile (1.3.2) ā”œā”€ā”€ commandbox-bullet-train (1.4.1) └── nerdvision (1.0.9)
b
Those versions seem correct.
Have you restarted the CLI since you updated?
p
nope, let me do that
b
Also, run this
Copy code
cfconfig task save ?
I know the param hints changed to have a bunch of
(Adobe only)
and
(Lucee only)
notes in the newest version
p
reload did it
āÆ cfconfig task list Task: every-month URL: http://localhost:80/?program=once Interval: Monthly Status: Running
b
Cool, I think I fixed that bug in the bleeding edge of Commandbox where updating a module doesn't reload it
So you were still on the old version basically as far as what was loaded in memory of the CLI
p
yup
thanks, I'll continue on this side and test some more
b
Cool šŸ‘