Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>cron2yamlNew to Visual Studio Code? Get it now.
cron2yaml

cron2yaml

Claudio Canales

|
3,865 installs
| (0) | Free
Convert cron entries to yaml
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

README

How to Use

  • right click to "Convert cron to yaml"

Example

# Prune the logs nightly
0 0 * * * /bin/bash /root/cronjobs/prune_log.sh

# Log watcher
*/5 * * * * /var/www/common/scripts/log_watcher.php
cronjob_/root/cronjobs/prune_log.sh:
  cron.present:
    - name: /bin/bash /root/cronjobs/prune_log.sh
    - user: root
    - minute: 0
    - hour: 0
    - comment: Prune the logs nightly

cronjob_/var/www/common/scripts/log_watcher.php:
  cron.present:
    - name: /var/www/common/scripts/log_watcher.php
    - user: root
    - minute: '*/5'
    - comment: Log watcher

Salt reference:

##salt.states.cron.present https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cron.html#salt.states.cron.present

salt.states.cron.present(name, user=u'root', minute=u'', hour=u'', daymonth=u'', month=u'', dayweek=u'*', comment=None, commented=False, identifier=False, special=None)

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft