Forum Discussion
ashu_aggarwal1
Altocumulus
Nov 29, 2022F5 OS r-Series cron job schedule
Hello All, I am looking for some assistence to schedule a cron job on the F5 OS host for taking regular backup for the F5 host system and exporting it to the remote path. I am trying to execute com...
Feb 12, 2025
Hi Ashu,
It sounds like you're trying to schedule a cron job on an F5 OS r-Series system to automate backups and export them to a remote path.
Here are some simple steps and tips to help you achieve this:
- Cron Job Setup:
- First, ensure you have the correct syntax for your cron job. You can edit the crontab file using crontab -e and add your cron job there. For example, to run a script every day at midnight, you would add:
- Backup Script:
- Create a script that performs the backup and exports it. Here’s a simple example:
- Running Commands as Admin:
- It seems like you're having trouble running commands as the admin user. Instead of using su - admin -c, you might need to log in as the admin user directly or use a different method to execute commands with the necessary permissions. For example, you can use the RESTCONF API for such tasks as told above by Nikoolayy [1].
- Troubleshooting:
- If your cron job isn’t working, try running the script manually to ensure it executes properly. Also, check the cron logs for any errors:
- Permissions:
- Ensure that the script has the correct permissions to be executed. You can set the executable permission using: bash chmod +x /path/to/your/backup_script.sh
If you continue to face issues, you might want to explore using the RESTCONF API for automating tasks on the F5 OS r-Series[1][2].
References
[1] F5 OS r-Series cron job schedule | DevCentral
[2] Automate Tasks in F5 with Cron Jobs - NetMinion Solutions
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects