You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# `hints` process directive for executor-specific scheduling hints
2
+
3
+
- Authors: Rob Syme
4
+
- Status: accepted
5
+
- Deciders: Paolo Di Tommaso, Ben Sherman, Rob Syme
6
+
- Date: 2026-03-23
7
+
- Tags: directive, executor, scheduling
8
+
9
+
## Summary
10
+
11
+
Introduce a `hints` process directive for executor-specific scheduling hints that don't map to existing directives.
12
+
13
+
## Problem Statement
14
+
15
+
Many executors can be configured in various ways on a per-task basis. For example:
16
+
17
+
- AWS Batch jobs can use *consumable resources* to limit concurrent job execution based on non-standard resources such as software license seats.
18
+
19
+
- Google Batch jobs can specify a *provisioning model* to control the use of spot vs on-demand VMs on a per-task basis.
20
+
21
+
- Seqera Scheduler supports a variety of resource and scheduling settings, including spot/on-demand provisioning.
22
+
23
+
These settings can be exposed by Nextflow as executor-specific config options, such as `google.batch.spot`, but config options are applied globally. In order to apply a setting to specific processes or tasks, it must be exposed as a process directive.
24
+
25
+
Process directives in Nextflow aim to provide a common vocabulary for executing tasks in many different environments. Directives such as `cpus`, `memory`, and `time` have broadly the same meaning across most executors, making it easier for users to write portable pipelines.
26
+
27
+
At the same time, many executors have custom settings not shared by other executors, and it is not practical to create a new process directive for every new setting. There are over 40 [process directives](https://docs.seqera.io/nextflow/reference/process#directives) at the time of writing, and every new directive adds cognitive load when a user is trying to find the right directive for a given situation.
28
+
29
+
There exist a few generic process directives already:
30
+
31
+
- The `clusterOptions` directive can be used to specify command-line arguments, primarily for HPC schedulers
32
+
- The `ext` directive supports arbitrary key-values, but is designed primarily to customize the task script (e.g. tool arguments), not executor behavior
33
+
- The `resourceLabels` directive also supports arbitrary key-values, but is intended for tagging and tracking resources, not controlling them
34
+
35
+
A new directive is needed to support executor-specific settings at a per-task level in a structured manner, without bloating the process directives for every new custom setting.
36
+
37
+
## Goals
38
+
39
+
- Provide a way to apply executor-specific settings to individual processes or tasks
40
+
41
+
- Avoid the proliferation of narrow, executor-specific directives (e.g. `consumableResources`, `schedulingPolicy`, etc.)
42
+
43
+
- Provide a single extension point that executors can consume selectively
44
+
45
+
- Allow settings to be specified as key-values, providing validation where possible
46
+
47
+
## Non-goals
48
+
49
+
- Replacing existing directives (`cpus`, `memory`, `accelerator`, `queue`) — those remain the right place for standard resources
50
+
51
+
## Decision
52
+
53
+
Introduce a `hints` process directive with namespaced keys. Executors consume the hints they understand and silently ignore the rest.
54
+
55
+
## Core Capabilities
56
+
57
+
### Syntax
58
+
59
+
The `hints` directive accepts a map of key-value pairs:
Keys are strings. Values may be any raw data type: strings, numbers, booleans, lists, or maps. Executors are responsible for defining which hints they recognize and what value type each hint expects.
87
+
88
+
In the above example, the `consumableResources` hint is given as a map of resource name to quantity. The AWS Batch executor supplies it to each job request using `ConsumableResourceProperties`.
89
+
90
+
### Namespacing
91
+
92
+
Keys can use dot-separated scopes to namespace settings as needed:
The executor prefix gives pipeline developers the ability to target specific executors and have assurance that it won't accidentally apply to other executors (e.g. if another executor adds support for the same hint in the future).
109
+
110
+
### Validation
111
+
112
+
Nextflow should validate hints to the best of its ability, to catch errors such as typos:
113
+
114
+
-**Prefixed hints** can be validated against the set of hints declared by the corresponding executor. Unrecognized hints should be reported as errors.
115
+
116
+
-**Unprefixed hints** can be validated against the union of hints declared by all executors. Since unprefixed hints might be supported by executors that aren't currently loaded, unrecognized hints should be reported as warnings.
117
+
118
+
### Multiple hint resolution
119
+
120
+
The `hints` directive uses *replacement semantics* when specified multiple times, meaning that each `hints` setting completely replaces any previous settings:
This behavior is consistent with other directives such as `pod` and `resourceLabels`. In practice, this means that a given `hints` setting should specify all relevant hints for the given context.
153
+
154
+
For example, the `withLabel` selector above should also specify the `provisioningModel` hint if the intention is to preserve that hint for the selected processes:
|`scheduling.provisioningModel`|`String`| Google Batch | Spot VM scheduling ([#3530](https://github.com/nextflow-io/nextflow/issues/3530)) |
Copy file name to clipboardExpand all lines: docs/cli.md
+8-131Lines changed: 8 additions & 131 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,149 +250,26 @@ $ nextflow drop nextflow-io/hello
250
250
251
251
See {ref}`cli-drop` for more information.
252
252
253
-
### Secret management
254
-
255
-
The `secrets` command manages secure pipeline secrets.
256
-
257
-
Use this to store credentials securely, reference them in pipelines without exposing values, and manage sensitive data centrally across your organization.
258
-
259
-
```console
260
-
$ nextflow secrets list
261
-
$ nextflow secrets set AWS_ACCESS_KEY_ID
262
-
$ nextflow secrets delete AWS_ACCESS_KEY_ID
263
-
```
264
-
265
-
See {ref}`cli-secrets` for more information.
266
-
267
253
## Module management
268
254
269
255
:::{versionadded} 26.04.0
270
256
:::
271
257
272
-
The `module` command enables working with reusable, registry-based modules. The Nextflow module system allows you to install, run, search, and publish standardized modules from registries, eliminating duplicate work and sharing improvements with the community.
273
-
274
-
Use these commands to discover modules in registries, install them into your project, run them directly without creating a workflow, and publish your own modules for others to use.
275
-
276
-
### Searching for modules
277
-
278
-
The `module search` command queries the module registry to discover available modules by keyword or name.
279
-
280
-
Use this to find modules for specific tasks, explore available tools, or discover community modules.
Results include module names, versions, descriptions, and download statistics. Use `-limit` to control the number of results and `-output json` for JSON-formatted output.
289
-
290
-
See {ref}`cli-module-search` for more information.
291
-
292
-
### Installing modules
293
-
294
-
The `module install` command downloads modules from a registry and makes them available in your workflow. Modules are stored locally in the `modules/` directory. An additional `.module-info` file is created during to store installation information such as the module checksum at installation and the registry URL.
295
-
296
-
Use this to add reusable modules to your pipeline, manage module versions, or update modules to newer versions.
The installed module will be available in `modules/nf-core/fastqc`.
304
-
305
-
Use the `-force` flag to reinstall a module even if local modifications exist.
306
-
307
-
See {ref}`cli-module-install` for more information.
308
-
309
-
### Listing modules
310
-
311
-
The `module list` command displays all modules currently installed in your project, showing their versions and integrity status.
312
-
313
-
Use this to review installed modules, check module versions, or detect local modifications.
314
-
315
-
```console
316
-
$ nextflow module list
317
-
$ nextflow module list -output json
318
-
```
319
-
320
-
The output shows each module's name, installed version, and whether it has been modified locally. Use `-o json` for JSON-formatted output.
258
+
The `module` command allows you to discover, install, and run modules through a centralized module registry. See {ref}`using-modules-page` and the {ref}`cli-module` command reference for more information.
321
259
322
-
See {ref}`cli-module-list` for more information.
260
+
## Secret management
323
261
324
-
### Viewing module information
325
-
326
-
The `module view` command displays detailed metadata and usage information for a specific module from the registry.
327
-
328
-
Use this to understand module requirements, view input/output specifications, see available tools, or generate usage templates before installing or running a module.
The output includes the module's version, description, authors, keywords, tools, input/output channels, and a generated usage template showing how to run the module. Use `-json` for machine-readable output suitable for programmatic access.
337
-
338
-
See {ref}`cli-module-view` for more information.
339
-
340
-
### Running modules directly
341
-
342
-
The `module run` command executes a module directly from the registry without requiring a wrapper workflow. This provides immediate access to module functionality for ad-hoc tasks or testing.
343
-
344
-
Use this to quickly run a module, test module functionality, or execute one-off data processing tasks.
345
-
346
-
```console
347
-
$ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz'
348
-
$ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz' -version 1.0.0
349
-
```
350
-
351
-
The command accepts all standard Nextflow execution options (`-profile`, `-resume`, etc.):
352
-
353
-
```console
354
-
$ nextflow module run nf-core/salmon \
355
-
--reads reads.fq \
356
-
--index salmon_index \
357
-
-profile docker \
358
-
-resume
359
-
```
360
-
361
-
Process inputs can be specified like params on the command line. For example, `--reads reads.fq` corresponds to the `reads` input in the `nf-core/salmon` module. Run `nextflow module view nf-core/salmon` to see the available params for the module.
362
-
363
-
See {ref}`cli-module-run` for more information.
364
-
365
-
### Removing modules
366
-
367
-
The `module remove` command deletes modules from your project, removing local files and configuration entries.
368
-
369
-
Use this to clean up unused modules, free disk space, or remove deprecated modules from your pipeline.
By default, both local files and configuration entries are removed. Use `-keep-files` to remove the configuration entry and `.module-info` while keeping local files.
377
-
378
-
See {ref}`cli-module-remove` for more information.
379
-
380
-
### Publishing modules
381
-
382
-
The `module publish` command uploads modules to a registry, making them available for others to install and use.
262
+
The `secrets` command manages secure pipeline secrets.
383
263
384
-
Use this to share your modules with the community, contribute to module libraries, or distribute modules within your organization.
264
+
Use this to store credentials securely, reference them in pipelines without exposing values, and manage sensitive data centrally across your organization.
Publishing requires authentication via the `NXF_REGISTRY_TOKEN` environment variable or the `registry.apiKey` config option. The module must include `main.nf`, `meta.yml`, and `README.md` files.
392
-
393
-
Use the {ref}`cli-module-spec` and {ref}`cli-module-validate` commands to prepare and validate a module before publishing.
394
-
395
-
See {ref}`cli-module-publish` for more information.
0 commit comments