b2c-job by salesforcecommercecloud/b2c-developer-tooling
npx skills add https://github.com/salesforcecommercecloud/b2c-developer-tooling --skill b2c-job使用 b2c CLI 插件在 Salesforce B2C Commerce 实例上运行现有作业以及导入/导出站点归档。
提示: 如果
b2c未全局安装,请使用npx @salesforce/b2c-cli代替(例如npx @salesforce/b2c-cli job run)。
需要创建新作业? 如果您需要编写自定义作业步骤代码(批处理、计划任务、数据同步),请改用
b2c:b2c-custom-job-steps技能。
# 运行作业并立即返回
b2c job run my-custom-job
# 运行作业并等待完成
b2c job run my-custom-job --wait
# 运行作业并设置超时(秒)
b2c job run my-custom-job --wait --timeout 600
# 运行带参数的作业(标准作业)
b2c job run my-custom-job -P "SiteScope={\"all_storefront_sites\":true}" -P OtherParam=value
# 如果作业失败则显示作业日志
b2c job run my-custom-job --wait --show-log
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
某些系统作业(如搜索索引)使用非标准的请求模式。使用 --body 提供原始的 JSON 请求体:
# 为特定站点运行搜索索引作业
b2c job run sfcc-search-index-product-full-update --wait --body '{"site_scope":["RefArch","SiteGenesis"]}'
# 为单个站点运行搜索索引作业
b2c job run sfcc-search-index-product-full-update --wait --body '{"site_scope":["RefArch"]}'
注意:--body 和 -P 是互斥的。
job import 命令在返回前会自动等待导入作业完成。它不使用 --wait 选项。
# 将本地目录作为站点归档导入
b2c job import ./my-site-data
# 导入本地 zip 文件
b2c job import ./export.zip
# 导入后在实例上保留归档文件
b2c job import ./my-site-data --keep-archive
# 导入实例上已存在的归档文件(位于 Impex/src/instance/)
b2c job import existing-archive.zip --remote
# 失败时显示作业日志
b2c job import ./my-site-data --show-log
# 使用 job export 命令导出站点数据
b2c job export
# 搜索作业执行记录
b2c job search
# 以 JSON 格式输出搜索结果
b2c job search --json
# 等待特定的作业执行完成
b2c job wait <execution-id>
有关 job 主题下所有可用命令和选项的完整列表,请参见 b2c job --help。
b2c:b2c-custom-job-steps - 用于创建新的自定义作业步骤(批处理脚本、计划任务、数据同步作业)b2c-cli:b2c-site-import-export - 用于站点归档结构和元数据 XML 模式每周安装量
72
代码仓库
GitHub 星标数
34
首次出现
2026年2月11日
安全审计
安装于
github-copilot66
codex63
opencode62
cursor62
amp61
kimi-cli61
Use the b2c CLI plugin to run existing jobs and import/export site archives on Salesforce B2C Commerce instances.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (e.g.,npx @salesforce/b2c-cli job run).
Creating a new job? If you need to write custom job step code (batch processing, scheduled tasks, data sync), use the
b2c:b2c-custom-job-stepsskill instead.
# run a job and return immediately
b2c job run my-custom-job
# run a job and wait for completion
b2c job run my-custom-job --wait
# run a job with a timeout (in seconds)
b2c job run my-custom-job --wait --timeout 600
# run a job with parameters (standard jobs)
b2c job run my-custom-job -P "SiteScope={\"all_storefront_sites\":true}" -P OtherParam=value
# show job log if the job fails
b2c job run my-custom-job --wait --show-log
Some system jobs (like search indexing) use non-standard request schemas. Use --body to provide a raw JSON request body:
# run search index job for specific sites
b2c job run sfcc-search-index-product-full-update --wait --body '{"site_scope":["RefArch","SiteGenesis"]}'
# run search index job for a single site
b2c job run sfcc-search-index-product-full-update --wait --body '{"site_scope":["RefArch"]}'
Note: --body and -P are mutually exclusive.
The job import command automatically waits for the import job to complete before returning. It does not use the --wait option.
# import a local directory as a site archive
b2c job import ./my-site-data
# import a local zip file
b2c job import ./export.zip
# keep the archive on the instance after import
b2c job import ./my-site-data --keep-archive
# import an archive that already exists on the instance (in Impex/src/instance/)
b2c job import existing-archive.zip --remote
# show job log on failure
b2c job import ./my-site-data --show-log
# export site data using the job export command
b2c job export
# search for job executions
b2c job search
# search with JSON output
b2c job search --json
# wait for a specific job execution to complete
b2c job wait <execution-id>
See b2c job --help for a full list of available commands and options in the job topic.
b2c:b2c-custom-job-steps - For creating new custom job steps (batch processing scripts, scheduled tasks, data sync jobs)b2c-cli:b2c-site-import-export - For site archive structure and metadata XML patternsWeekly Installs
72
Repository
GitHub Stars
34
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykPass
Installed on
github-copilot66
codex63
opencode62
cursor62
amp61
kimi-cli61
Supabase Postgres 最佳实践指南 - 8大类别性能优化规则与SQL示例
78,800 周安装